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
 General SQL Server Forums
 New to SQL Server Programming
 Cursors

Author  Topic 

masterdineen
Aged Yak Warrior

550 Posts

Posted - 2008-07-08 : 05:06:30
Hello everyone

Can someone just explain to me what a Cursor is for and what it does please

Regards

Rob

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-07-08 : 05:09:59
see
http://www.sqlteam.com/article/cursors-an-overview


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

masterdineen
Aged Yak Warrior

550 Posts

Posted - 2008-07-08 : 05:18:06
thank you
Go to Top of Page

TalMcMahon
Starting Member

4 Posts

Posted - 2008-07-08 : 13:15:00
Please keep in mind that in general cursors are the solution of last resort (read "cursors are evil"). In my own coding If i use a cursor it is only when I have concluded that every other technique is no longer an option. I will use them only for things like Data Generation for Sample data. Everything else can usually be done with some type of Subquery or derived table.

What exactley are you trying to accomplish?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-08 : 13:59:40
It would be better if you can give an explanation of what you're trying to achieve may be illustrate with some sample data so that we can suggest if this can done in a better way without using cursors.
Go to Top of Page
   

- Advertisement -