Hello All,

I have a stored procedure in which I construct a SQL statement on fly and execute it (dynamic SQL). Now, I want to take the result set returned by this dynamic SQL (Column list is always the same) into an output variable of the stored procedure.

Can someone tell me give a sample piece of code to achieve this? Your help is greatly appreciated.

Thanks,
Desi Rookie