David Rosenstrauch
2006-06-06 16:54:53 UTC
Hi. Been using squirrel for a few months now and love it. (Kudos to
the developers!)
I've used it with no problems on Oracle, Sybase, SQL Server, and MySQL.
But I just started using it with DB2 and ran into an issue. I hope
someone here has a solution, because it's a really annoying problem.
(i.e., is making Squirrel unusable with DB2 for me)
With every other database, I'm able to send multiple SQL statements to
the database all in one fell swoop. I just highlight the statements I
want to send, and then hit Ctrl-Enter. For example, I often send
multiple update statements simultaneously, like this:
UPDATE foo SET bar = 5;
UPDATE home SET bart = 3;
However, DB2 (or at least the version that I'm work with - UDB 8.1)
barfs when I try to do this. I get an error like this:
Query 1 of 2 elapsed time (seconds) - Total: 0.004, SQL query: 0.004,
Building output: 0
Error: com.ibm.db2.jcc.b.SQLException: The character "
" following "BEGIN-OF-STATEMENT" is not valid., SQL State: 42601, Error
Code: -7
Error occured in:
UPDATE home SET bart = 3
It looks like either Squirrel or DB2 or JDBC - or some combination
thereof - doesn't like the line feed between the 2 SQL statements. So
the first statement appears to execute fine, but then it gives me an
error when it sees the line-feed before the 2nd statement.
Anyone know if there's any way to fix or work around this? I've got way
too many SQL statements to execute to send them one at a time!
TIA,
DR
the developers!)
I've used it with no problems on Oracle, Sybase, SQL Server, and MySQL.
But I just started using it with DB2 and ran into an issue. I hope
someone here has a solution, because it's a really annoying problem.
(i.e., is making Squirrel unusable with DB2 for me)
With every other database, I'm able to send multiple SQL statements to
the database all in one fell swoop. I just highlight the statements I
want to send, and then hit Ctrl-Enter. For example, I often send
multiple update statements simultaneously, like this:
UPDATE foo SET bar = 5;
UPDATE home SET bart = 3;
However, DB2 (or at least the version that I'm work with - UDB 8.1)
barfs when I try to do this. I get an error like this:
Query 1 of 2 elapsed time (seconds) - Total: 0.004, SQL query: 0.004,
Building output: 0
Error: com.ibm.db2.jcc.b.SQLException: The character "
" following "BEGIN-OF-STATEMENT" is not valid., SQL State: 42601, Error
Code: -7
Error occured in:
UPDATE home SET bart = 3
It looks like either Squirrel or DB2 or JDBC - or some combination
thereof - doesn't like the line feed between the 2 SQL statements. So
the first statement appears to execute fine, but then it gives me an
error when it sees the line-feed before the 2nd statement.
Anyone know if there's any way to fix or work around this? I've got way
too many SQL statements to execute to send them one at a time!
TIA,
DR