ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Burke.Kevin" <Kevin.Bu...@cic.gc.ca>
Subject RE: DELETE statement deletes all rows in table
Date Wed, 11 Feb 2009 16:52:54 GMT
Yeah, I figured as much.

Did this already and as I mentioned, the output looks correct. We could
take the logged statement and dump it into an external sql client, run
it against our ASE database and it ran as expected. But when iBatis
executed it through the db connection, it wiped the table. The output
from the logging had "dbo." included in the statement.

The only discrepency I noticed was the statement was missing "dbo."
after the DELETE table command:

DELETE table1
FROM dbo.table1 t1,
     dbo.table2 t2
WHERE t1.column = t2.column
AND	t2.column2 = <someValue>

In this case, the table name after the DELETE did not have "dbo.", but
table in the where clause did (they were the same table).  Is the
java.sql code that sensitive to the ANSI SQL syntax?

Again though, this works through a sql client, but not through iBatis.


-----Original Message-----
From: Larry Meadors [mailto:larry.meadors@gmail.com] 
Sent: February 11, 2009 11:42 AM
To: user-java@ibatis.apache.org
Subject: Re: DELETE statement deletes all rows in table

He meant "java.sql". not "javax.sql".


On Wed, Feb 11, 2009 at 9:33 AM, Richard Yee <ryee@cruzio.com> wrote:
> Turn on debug logging for javax.Sql
> And see what statements are getting prepared.

View raw message