Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Stored Procedures and cursors

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-01-04 : 08:46:36
Sandeep writes "i am writting a Stored Procedure that selects data from tables and
prints it. I am using it for report generation.
For this i have used a cursor, to iterate through record set and generate the output.

The problem for me is,
i have to select a field from some other table depending on one of the field i get in the cursor (after using fetch).
I have 2 options here
1. Use a nested cursor, which will select the required field from table.
2. Call one more stored procedure, which will return the required field (in output variable).

Which one is efficient ???
Thanks."

nr
SQLTeam MVY

12543 Posts

Posted - 2005-01-04 : 09:23:38
Please - stop all the cursor questions.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -