Hi All,

I have a set of sub-documents associated with a document. The information
about the documents and sub-documents is stored in seperate tables. The
title of sub-document begins with the Number associated with its parent
document.

If User changes the Document Number, I want to change the titles of all the
sub-documents associated with it, to reflect this change. I want to do this
in the Stored Proc that is updating the Document.

My problem is: Since this will have to update several rows in the sub-doc
table, how do I write the stored proc? I am thinking on these lines:

While (Select DocID From SubDoc_Table)= @DocID
Begin
Select @X = the SubDocTitle,
Change the SubDocTitle,
Update the SubDoc_table
End
Is there a better approach?
Please help.
Thanks,
Sheila