Try cursor

Sujit Patil replied to bretto kumar A at 05-Jul-08 09:20

I think you can try a cursor for that. Means first take the values into cursor from your procedure and then chk out it in the loop accordingly.

something like;

DECLARE get_values CURSOR FOR ( exec spu_SdOtherNews )

OPEN get_values

FETCH NEXT FROM get_values into @variables as per your procedure;

WHILE @@FETCH_STATUS = 0

begin

////////in this loop you can use it.

FETCH NEXT FROM get_values into @variables as per your procedure;

end

CLOSE get_values

DEALLOCATE get_values

I am not sure will this help you or not , but i think this is one way to solve your problem.

Try it.

Best Luck!!!!!!!!!!!!!!!!!
Sujit.


Click here to sign in and reply. You could earn money via our $500 contest just for being helpful.
  store procedure - bretto kumar A  05-Jul-08 08:46 8:46:19 AM
      Go For Select Query - Sanjay Verma  05-Jul-08 09:13 9:13:44 AM
      Try cursor - Sujit Patil  05-Jul-08 09:20 9:20:00 AM
      I just went through this - Jason S  05-Jul-08 09:31 9:31:51 AM
      Re : Store Procedure - Ashutosh Dhok  05-Jul-08 10:44 10:44:20 AM
      ans to sp - Umapathy Kaliaperumal  06-Jul-08 08:03 8:03:14 AM
      OPENROWSET - sundar k  06-Jul-08 01:39 1:39:34 PM
      Yes u can execute sp within sp - Arvind Kumar  07-Jul-08 01:12 1:12:21 AM
View Posts