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:
October 15, 2009 5:32 PM
UPDATED:
October 15, 2009 10:38 PM
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