Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » Run script to create procedure in DB2
Run script to create procedure in DB2 [message #594761] Fri, 13 March 2009 19:27
Jon Kosmoski is currently offline Jon KosmoskiFriend
Messages: 5
Registered: July 2009
Junior Member
Hi, I am unable to run a script containing the following against a DB2 9.5
using DTP 1.6.2 on Eclipse 3.4.2.
I get errors such as: An unexpected token "END-OF-STATEMENT" was found
following "ARE SQLSTATE CHAR(5)". Expected tokens may include:
"<psm_semicolon>".. SQLCODE=-104, SQLSTATE=42601, DRIVER=3.50.152

It is as if the --#set terminator @ is being ignored. Does the DTP (as does
SQLExplorer) fail to send the comment to the DB engine?
--#set terminator @
CREATE PROCEDURE my_quiet_drop( IN statement VARCHAR(1000) )
LANGUAGE SQL
BEGIN
DECLARE SQLSTATE CHAR(5);
DECLARE NotThere CONDITION FOR SQLSTATE '42704';
DECLARE NotThereSig CONDITION FOR SQLSTATE '42883';
DECLARE EXIT HANDLER FOR NotThere, NotThereSig
SET SQLSTATE = ' ';
SET statement = 'DROP ' || statement;
EXECUTE IMMEDIATE statement;
END
@

Thanks in advance for any help with this.
Previous Topic:Run script to create procedure in DB2
Next Topic:Re: Can't install a thing
Goto Forum:
  


Current Time: Fri Apr 19 06:54:07 GMT 2024

Powered by FUDForum. Page generated in 0.01791 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top