Hey here's the solution -
1) Using External Stored Proceudre Transformation will resolve this. Have some home work. Let me know in case of nay isssues.
2) The best solution is achieving this thru calling a Stored Procedure beyond Informatica premises will resolve.
Incur your logic in Stored Proc and call it thru Post session by creating a Dummy task at Informatica level.
We resloved our issues in past thru the Second approach.
Same approach given by Whoever.Hope you got the right solution...! 