begin declare continue handler for sqlstate '42704' begin /* Ignore */ end@

begin declare continue handler for sqlstate '42704' begin /* Ignore */ end@

Post by gimme_this » Wed, 29 Jul 2009 06:39:35


I have a script that looks like this:

I'm not getting the syntax for declaring a continue handler.

I have:

set path sysibm,sysfun,sysproc,sysibmadm@

begin declare continue handler for sqlstate '42704'
begin /* Ignore */ end@
alter table can drop constraint can_fk2@
end


Which results in this:

begin declare continue handler for sqlstate '42704' begin /* Ignore */
end
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0104N An unexpected token "declare" was found following "begin
".
Expected tokens may include: "JOIN <joined_table>". SQLSTATE=42601

Thanks.