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 2005 Forums
 Transact-SQL (2005)
 Whats the best way to loop through records

Author  Topic 

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-09-18 : 10:12:17
Hello,
I have a table of supported phone networks. This has networks for many countries and thier network codes.

Whats the easiest way to loop through each recordset one by one, in order to compare certain column values ?

Is there an alternative to cursors ?

Not sure abt MS SQL 2005 & 2008, not sure if cursors have been improved or perfected yet ???

Thanks
Ehi



visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-18 : 10:20:38
Why do you want to loop one by one? cant you go for set based approach? what's it that you're trying to achieve?
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-09-18 : 10:21:01
What you want can it be done with set based solution ?


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

Go to Top of Page
   

- Advertisement -