Thursday, February 9, 2012

Alternative to cursor.

Hi all,
I want to get data from table and do some processing depending on
records of table.
Do i need to use cursor. Or is there any other alternative available
for this.
Any suggestion would be truely appreciated.
thanks in advance.
<trialproduct2004@.yahoo.com> wrote in message
news:1160140929.983520.124390@.i3g2000cwc.googlegro ups.com...
> Hi all,
> I want to get data from table and do some processing depending on
> records of table.
> Do i need to use cursor. Or is there any other alternative available
> for this.
> Any suggestion would be truely appreciated.
> thanks in advance.
>
That depends on the type of processing you need to do. In general, using
set based solutions rather than procedural (cursor) solutions is faster in
SQL Server.
If you give some specifics of your problem and the desired results etc. we
can be more helpful here.
Check out: http://www.aspfaq.com/etiquette.asp?id=5006
Rick Sawtell
|||what specifically do you want to do?
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
Make SQL Server faster - www.quicksqlserver.com
___________________________________
<trialproduct2004@.yahoo.com> wrote in message
news:1160140929.983520.124390@.i3g2000cwc.googlegro ups.com...
> Hi all,
> I want to get data from table and do some processing depending on
> records of table.
> Do i need to use cursor. Or is there any other alternative available
> for this.
> Any suggestion would be truely appreciated.
> thanks in advance.
>
|||Try to avoid cursors as they in general don't offer the performance that set
based operations do. Try to do a set based operation if possible.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
<trialproduct2004@.yahoo.com> wrote in message
news:1160140929.983520.124390@.i3g2000cwc.googlegro ups.com...
> Hi all,
> I want to get data from table and do some processing depending on
> records of table.
> Do i need to use cursor. Or is there any other alternative available
> for this.
> Any suggestion would be truely appreciated.
> thanks in advance.
>

No comments:

Post a Comment