Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with semicolon ; in multiple statement

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,
I am tring to execute multiple SQL statements using my ADO/Windows application connecting to DB2 on AS400.

My sql statement is very simple, someting like:

UPDATE sometable set somet=1 where someting=1 ;
UPDATE sometable set somet=1 where someting=2

I put semicolon between the UPDATES.

When I execute it I get an error:
Token ; was not valid. Expecting token:<END-OF-STATEMENT>

My update statements work fine by themself.
But I can't execute multiple statements.

Does anyone know what may be wrong?

Thanks

Robert

 
Are u using Command Center to do this?? If u are using it, u can set the delimiter as &quot;;&quot;. U should be careful that u should not hit a enter (line feed) after the last semicolon (last line in the script).
Rathna
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top