Unanswered: Possible to write a procedure without defining 'CREATE'?
In MS SQL 2008 it seems to be possible to write a 'procedure' without actually defining the "create procedure". Is this possible to do in DB2 9.7 fixpack 4? So I woul just have an ordinary .sql file that is run e.g. as a transaction within BEGIN/END? If I take away the procedure declaration, my editor refuses to run the .sql file.
One statement that I am trying to execute is the one below:
DECLARE V_SQL VARCHAR(1024);
SET V_SQL = ('BEGIN
IF EXISTS(SELECT NAME FROM SYSIBM.SYSTRIGGERS WHERE NAME = ''TRIGGER_EMPLOYEE_FOR_DELETES'') THEN
DROP TRIGGER TRIGGER_EMPLOYEE_FOR_DELETES;
PREPARE S1 FROM V_SQL;
I have tried adding/removing ";" and statement symbol "!" but still cannot get it to work.