SqlDbx
You are not logged in.
Hi,
I am trying to make multiple updates on my table and each update statement separated by ;
UPDATE TABLE SET COLUMN1 = VALUE1 WHERE COLUMN2 = VALUE-1;
UPDATE TABLE SET COLUMN1 = VALUE2 WHERE COLUMN2 = VALUE-2;
UPDATE TABLE SET COLUMN1 = VALUE2 WHERE COLUMN2 = VALUE-2;
Only the 1st statement run, the rest were not and I got the following message
DATADIRECT [ODBC SHADOW DRIVER] [DB2] SQLCODE = 098, WARNING DYNAMIC SQL STATEMENT ENDS WITH A SEMICOLON.
I tried
--# SET DELIMETER !
and it also did not work. Any suggestion?
Thanks
Mike
Offline
In general this should work ok. What database and version you connect to?
Offline
ZOS Mainframe DB2 Version 9.
--#SET DELIMETER is giving me the following error:
SQLCODE -198, THE OPERAND OF THE PREPARE OR EXECUTE IMMEDIATE STATEMENT IS BLANK OR EMPTY
Offline
SET DELIMITER is not going to work for generic ODBC connection. It only works for native DB2 connection.
This is because when using generic ODBC connection SqlDbx uses only functionality available in ODBC.
Offline
Does it mean I can issue multiple SQL statement for ODBC connection? There is no way to go around it?
Offline
You should be able to issue multiple statements for ODBC. Statement separator in ODBC in ";"
It looks that it works correctly in the latest version (3.49).
Offline
I checked the SQLDBX version and I am using 3.1. I upgraded to 3.3 and it is working now. Thanks.
Offline