Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursor for Update in Stored Procedure
Message
De
15/04/2003 14:11:02
 
 
À
15/04/2003 12:11:14
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
00777828
Message ID:
00777919
Vues:
9
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform