How to Over come Cursor Drawbacks in Sql????

Posted by Sabarimahesh under Sql Server on 4/3/2012 | Points: 10 | Views : 1036 | Status : [Member] | Replies : 9
Is There Any other Method to Overcome cursor???????

Sql Expects kindly help me

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M



Responses

Posted by: Rajni.Shekhar on: 4/3/2012 [Member] Bronze | Points: 25

Up
0
Down
using nested query
using temp table
using for loop
using cases

Thanks,
Rajni Shekhar

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/3/2012 [Member] Bronze | Points: 25

Up
0
Down
IF i Using Nested Cursor

How Can i use these Things


Can You Explain Briefly

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajni.Shekhar on: 4/3/2012 [Member] Bronze | Points: 25

Up
0
Down
i am not talking about nested cursor,
check it there is a nested query in my old post.

Thanks,
Rajni Shekhar

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/3/2012 [Member] Bronze | Points: 25

Up
0
Down
Rajni.Shekhar

Ya u r right


I asking the next question

IF i Using Nested Cursor

How Can i use these Things


Can You Explain Briefly


Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Niladri.Biswas on: 4/17/2012 [Member] Platinum | Points: 25

Up
0
Down
Why not u are trying with Recursive CTE?

Best Regards,
Niladri Biswas

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/17/2012 [Member] Bronze | Points: 25

Up
0
Down
Niladri.Biswas

An you Explain Clearly with Example

Recursive CTE mean



Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Niladri.Biswas on: 4/17/2012 [Member] Platinum | Points: 25

Up
0
Down
Look into these examples http://msdn.microsoft.com/en-us/library/ms175972.aspx

Hope this will give u the idea of CTE/Recursive CTE approach.

Best Regards,
Niladri Biswas

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/18/2012 [Member] Bronze | Points: 25

Up
0
Down
Niladri.Biswas
I'll Check

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jasminej on: 4/18/2012 [Member] Starter | Points: 25

Up
0
Down
You can use simple WHILE loop to fetch/access/update row by row data by generating sequence number for the records.


Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response