Hello,
I have one Stored procedure which executes multiple Stored proceudres in a loop. These sun procedures are stored in a table. So to execute them dynamically, i am using Prepare and execute command.
Now i also need to store the No of Rows affected/returned in case of each procedure. If the procedure is Update/Delete, i need to store the No of rows affected in some other table. if the procedure is of 'SELECT' type, i need to store all the records returned in 2nd table and Rows affected in other table.
I have tried using Get Diagnostics, but it seems, it works only in case of DML commands (Select, Update, Delete). When i try using this for 'Call <procedure'' it is returning 0.
Is there any way to find out these details for the Call Procedure statement. The thing is, when i simply write Call procedure in my sql client, in the output screen, i can see the no of rows affected, so there must be a way to find out that.
COuld you pleae help me with this
Many Thanks,
Shuchi
I have one Stored procedure which executes multiple Stored proceudres in a loop. These sun procedures are stored in a table. So to execute them dynamically, i am using Prepare and execute command.
Now i also need to store the No of Rows affected/returned in case of each procedure. If the procedure is Update/Delete, i need to store the No of rows affected in some other table. if the procedure is of 'SELECT' type, i need to store all the records returned in 2nd table and Rows affected in other table.
I have tried using Get Diagnostics, but it seems, it works only in case of DML commands (Select, Update, Delete). When i try using this for 'Call <procedure'' it is returning 0.
Is there any way to find out these details for the Call Procedure statement. The thing is, when i simply write Call procedure in my sql client, in the output screen, i can see the no of rows affected, so there must be a way to find out that.
COuld you pleae help me with this
Many Thanks,
Shuchi