Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursor for Update in Stored Procedure
Message
From
15/04/2003 14:11:02
 
 
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00777828
Message ID:
00777919
Views:
10
I wish I could. The inner loop processes selected rows ("Open" and "Close") from the subsidiary table and calculates the "age" of the parent row based on the cumulative differences between all the Open and Close records PLUS the difference between the last Open record and today's date.

I had a suggestion from another source that since I have the key to the parent row in a variable from the outer look (@corr_ID) I could do an UPDATE etc. WHERE Correspendence_ID = @corr_ID and not worry about using the cursor to position for the update. That way I can use a Read-Only Forward cursor. Sounds tempting. Although I'd still like to understand how to do a FOR UPDATE cursor in a Stored Procedure, even if just to have the theoretical basis.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform