Hi,
Try setting the SQL separator to something else, e.g. ~ in Global Preferences and add that ~ at the end of your SQL bloc.
This will send the SQL bloc to DB2/400 as one single inscruction.

Erwan


Le 22/01/2014 17:45, Alex Malmyguine a écrit :

Not sure if this is Squirrel issue or JTOpen issue, but I am seeing this:

 

BEGIN

                IF EXISTS(SELECT 1 FROM QSYS2.SYSPROCS WHERE ROUTINE_SCHEMA = 'S' AND ROUTINE_NAME = 'N') THEN

                                DROP PROCEDURE S.N;

                END IF;

END;

 

Error:

 

Error: [SQL0104] Token <END-OF-STATEMENT> was not valid. Valid tokens: ;.

SQLState:  42601

ErrorCode: -104

 

Same SQL runs in iSeries Navigator fine.

 

Thank you!

Alex

 



------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk


_______________________________________________
Squirrel-sql-users mailing list
Squirrel-sql-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users




Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection Antivirus avast! est active.