I'm just an (innocent) bystander, so forgive my
'wildass' guessing. And, I also don't have ANY real
knowledge about the context of your question as
it relates to Squirrel.
Having said that, I'm just trying to imagine that (probably)
you already HAVE (HAD) a file full of SQL cmds (from somewhere)
that already have line-feeds/new-lines/carriage-returns or whatever
separating
each line, right?
If so, does it make sense that you could just write a small program/script
to REMOVE any/all such line-feeds/new-lines/car-returns from that
file. Then bring up that file in an editor, COPY the body (a whole bunch of
SQL cmds)
into the 'clipboard', and then PASTE them all into the appropriate
input field (i.e. into Squirrel)?
Sorry if I'm way off base, guessing.
Cheers...
Dave
-----Original Message-----
From: squ...@li...
[mailto:squ...@li...]On Behalf Of
David Rosenstrauch
Sent: Tuesday, June 06, 2006 12:55 PM
To: squ...@li...
Subject: [Squirrel-sql-users] Problem using squirrel with DB2
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
_______________________________________________
Squirrel-sql-users mailing list
Squ...@li...
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
|