Dropping a DB2 Stored Procedure
5 pts.
0
Q:
Dropping a DB2 Stored Procedure
In my DB2 stored procs I always first drop the procedure and then do a create statement.  Is there any way I could say something like...if exists (select * from sysroutines where routine_name = 'procname') then drop procedure procname;  ?   I tried this, but the proc doesn't like the IF statement as the first line.  Has anyone tried this?

 

 

 



Software/Hardware used:
iSeries
ASKED: Oct 15 2009  5:32 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
5 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
Last Answered: Oct 15 2009  5:32 PM GMT by MIkeyDee   5 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

TomLiotta   7610 pts.  |   Oct 15 2009  10:38PM GMT

In my DB2 stored procs I always first drop the procedure…

That sounds a little like you want the stored proc to drop and recreate itself. Can you give a little more description of what you need? I suspect that perhaps “drop the procedure” can use different wording.

Tom

 
0