View Single Post
  #2 (permalink)  
Old July 4th, 2007, 11:44 AM
mkmustafa mkmustafa is offline
Registered User
 
Join Date: Jul 2007
Location: , , USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

you have to create a temporary table in the procedure with the structure that you want and fill this table for each group selected
this temporary table should contain these fields

ID Group Field1 Field2 Field3

the select from the initial table filtering on the id the loop over the cursor and fill the temporary table , then select from temp. table and return the result.
note: temp. table will be deleted automatically win the scope of the procedure is finished.
Reply With Quote