May 12, 2005 #1 CapsuleCorpJX IS-IT--Management Joined Jun 23, 2004 Messages 70 Location US Is there anything a stored procedure can do that a macro can't?
May 13, 2005 1 #2 dnoeth Instructor Joined Oct 16, 2002 Messages 545 Location DE - define and set variables - IF/THEN/ELSE - loop using WHILE/REPEAT - dynamic SQL - cursors - error handling Dieter Upvote 0 Downvote
- define and set variables - IF/THEN/ELSE - loop using WHILE/REPEAT - dynamic SQL - cursors - error handling Dieter
Jul 26, 2005 #3 shridana Programmer Joined Apr 20, 2005 Messages 5 Location US I have a question here regarding the macro and SP. I know that a macro can reference a global temporary table and volatile table. Can a stored proc also do that? If not, then that will also be a difference between the two. Upvote 0 Downvote
I have a question here regarding the macro and SP. I know that a macro can reference a global temporary table and volatile table. Can a stored proc also do that? If not, then that will also be a difference between the two.
Jul 26, 2005 #4 dnoeth Instructor Joined Oct 16, 2002 Messages 545 Location DE Of course it can. But there's one thing only a macro can do: return answer sets To do that within a SP you have to insert/select the data into a global temp table and after CALLing the SP select from that table. Dieter Upvote 0 Downvote
Of course it can. But there's one thing only a macro can do: return answer sets To do that within a SP you have to insert/select the data into a global temp table and after CALLing the SP select from that table. Dieter
Jul 31, 2005 #5 shridana Programmer Joined Apr 20, 2005 Messages 5 Location US Another way by which your stored procedure can return an ouput is using a cursor. Cursors are used only for multiple row outputs. Upvote 0 Downvote
Another way by which your stored procedure can return an ouput is using a cursor. Cursors are used only for multiple row outputs.