I am modifying a stored procedure which is using a cursor, I want to be able to print out or output the values from the cursor that is inserting into a table but am having a hard time trying to figure out how to do this. I need to check all the values for example that get inserted in the orders table by this stored procedure.
I cant do
Print @prodId, @orderQuantity, @orderDate, @orderLocationId, @shipmentId, @shipmentDate
How can I output/print all the values the cursor has in these columns for each record it goes through? An example with how to do this in code would be appreciated.
You can capture & store the inserted rows in the correct order by outputting them into a temp table with an identity;