|
-
Oct 7th, 2012, 08:49 PM
#1
Thread Starter
Hyperactive Member
Avoide cursor in Tsql
im writing a stored procedure, trying to avoid the use of a cursor but cant think of a work around. here is a sample example of my case.
i have tables : customers and orders
first i query the orders for any lines with due quantity grouped by the customer id into a cursor.
then i loop the cursor and select all due orders for each customer into a second cursor which i loop in turn to create a html file in a specific format which i then email through.
i couldnt come with a more efficient structure, any suggestions ??
thanks
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|