Database editing software Aqua Data Studio/DbVisualizer
stored procedures as follows:
create or replace procedure DM.proc_test(
in i_seq integer,
out o_flag integer
)
begin
declare v_test varchar(20);
end;
[CREATE]DB2 SQL Error:SQLCODE=-104,SQLSTATE=42601,SQLERRMC= end-of-statement; E v_test varchar(20); < psm_semicolon>
[END]DB2 SQL Error:SQLCODE=-104,SQLSTATE=42601,SQLERRMC=END-OF-STATEMENT; END; JOIN < joined_table>
[CREATE]DB2 SQL Error:SQLCODE=-104,SQLSTATE=42601,SQLERRMC=END-OF-STATEMENT;E v_test varchar(20);<psm_semicolon>
[END]DB2 SQL Error:SQLCODE=-104,SQLSTATE=42601,SQLERRMC=END-OF-STATEMENT;END;JOIN <joined_table>
for database editing software or command Windows, the default closing symbol is “;” , so when the stored procedure above is executed, the statement will end only before the end statement.
modify the editor’s statement terminator to be other symbols
1) command window modify statement terminator (example, change to @) :
delimiter @
2) database software, modify the delimiter (delimiter) to be other in configuration
Read More:
- Solve a bug harvest of DB2 (sqlcode = – 805, sqlstate = 51002, error message = DB2 SQL error: sqlcode = – 805, sqlstate = 5100
- DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=;;,?,?,?,?,?,?,?,?);END-OF-STATEMENT
- DB2 SQL error: sqlcode = – 803, sqlstate = 23505, sqlerrmc = 2 [solution]
- DB2 SQL error: SQLCODE: -433, SQLSTATE: 22001, SQLERRMC
- DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703
- DB2 timed task execution stored procedure cannot complete scheduler thread’s initialization
- DB2 SQL error: sqlcode = – 433, sqlstate = 22001 solved
- Error when connecting to database: DB2 SQL error: sqlcode = – 204, sqlstate = 42704, sqlerrmc= YXUAT.CUST_ BLK_ REL, DRIVER=4.25.13
- DB2 SQL ERROR: SQLCODE=-803, SQLSTATE=23505, SQL
- How to call stored procedure in Hibernate
- How to debug stored procedure/function in TOAD
- SQLCODE=-551, SQLSTATE=42501 error resolution
- DB2 encountered the problem of sqlcode = 911 lock table when updating record update
- DB2 create table error – 104 42601 illegal symbol encountered in SQL statement
- Clear the user name and password stored in GIT
- Runtime error 5 Invalid procedure call or argument
- Using the TP framework, an error is reported sqlstate [08004] [1040] too many connections
- SQL Error: 1452, SQLState: 23000
- SQL Error: 17059, SQLState: 99999