Does anyone know if H2 support LIKE clause in DELETE

4 views
Skip to first unread message

lucky001

unread,
Oct 31, 2008, 2:06:23 PM10/31/08
to H2 Database
Hi everyone

I am woundering if someone know that H2 database support the following
DELETE statement

DELETE FROM mytable WHERE mycolumn LIKE 'match_this';

I am trying this and getting the following error.




org.h2.jdbc.JdbcSQLException: General error:
java.lang.NoClassDefFoundError: java.lang.CharSequence [HY000-63]
at org.h2.message.Message.getSQLException(Unknown Source)
at org.h2.message.Message.convert(Unknown Source)
at org.h2.message.TraceObject.logAndConvert(Unknown Source)
at org.h2.jdbc.JdbcConnection.prepareStatement(Unknown Source)
at pmc.test.H2Test1.deleteCachedData(Unknown Source)
at pmc.test.TestMain.test1(Unknown Source)
at IBIClient.main(Unknown Source) java.lang.NoClassDefFoundError:
java.lang.CharSequence
at java.lang.Class.verifyImpl(Native Method)
at java.lang.Class.verify(Unknown Source)
at java.lang.Class.initialize(Unknown Source)
at org.h2.command.Parser.readCondition(Unknown Source)
at org.h2.command.Parser.readAnd(Unknown Source)
at org.h2.command.Parser.readExpression(Unknown Source)
at org.h2.command.Parser.parseDelete(Unknown Source)
at org.h2.command.Parser.parsePrepared(Unknown Source)
at org.h2.command.Parser.parse(Unknown Source)
at org.h2.command.Parser.parse(Unknown Source)
at org.h2.command.Parser.prepareCommand(Unknown Source)
at org.h2.engine.Session.prepareLocal(Unknown Source)
at org.h2.engine.Session.prepareCommand(Unknown Source)
at org.h2.jdbc.JdbcConnection.prepareCommand(Unknown Source)
at org.h2.jdbc.JdbcPreparedStatement.<init>(Unknown Source)
at org.h2.jdbc.JdbcConnection.prepareStatement(Unknown Source)
at pmc.test.H2Test1.deleteCachedData(Unknown Source)
at pmc.test.TestMain.test1(Unknown Source)
at IBIClient.main(Unknown Source) java.lang.NoClassDefFoundError:
java.lang.CharSequence
at java.lang.Class.verifyImpl(Native Method)
at java.lang.Class.verify(Unknown Source)
at java.lang.Class.initialize(Unknown Source)
at org.h2.command.Parser.readCondition(Unknown Source)
at org.h2.command.Parser.readAnd(Unknown Source)
at org.h2.command.Parser.readExpression(Unknown Source)
at org.h2.command.Parser.parseDelete(Unknown Source)
at org.h2.command.Parser.parsePrepared(Unknown Source)
at org.h2.command.Parser.parse(Unknown Source)
at org.h2.command.Parser.parse(Unknown Source)
at org.h2.command.Parser.prepareCommand(Unknown Source)
at org.h2.engine.Session.prepareLocal(Unknown Source)
at org.h2.engine.Session.prepareCommand(Unknown Source)
at org.h2.jdbc.JdbcConnection.prepareCommand(Unknown Source)
at org.h2.jdbc.JdbcPreparedStatement.<init>(Unknown Source)
at org.h2.jdbc.JdbcConnection.prepareStatement(Unknown Source)
at pmc.test.H2Test1.deleteCachedData(Unknown Source)
at pmc.test.TestMain.test1(Unknown Source)
at IBIClient.main(Unknown Source) Exception: General error:
java.lang.NoClassDefFoundError: java.lang.CharSequence [HY000-63]






Thomas Mueller

unread,
Nov 3, 2008, 3:23:05 PM11/3/08
to h2-da...@googlegroups.com
Hi,

> I am woundering if someone know that H2 database support the following
> DELETE statement
>
> DELETE FROM mytable WHERE mycolumn LIKE 'match_this';

Yes this is supported.

> org.h2.jdbc.JdbcSQLException: General error:
> java.lang.NoClassDefFoundError: java.lang.CharSequence [HY000-63]

You are using H2 version 1.0.63, I suggest to upgrade to a newer version.

> java.lang.CharSequence
> at java.lang.Class.verifyImpl(Native Method)

The exception looks like a problem with your Java installation. Sorry
I don't think I can help you much with that.

Regards,
Thomas

lucky001

unread,
Nov 4, 2008, 10:23:52 AM11/4/08
to H2 Database
Thanks Thomas - I got it resolved.


On Nov 3, 2:23 pm, "Thomas Mueller" <thomas.tom.muel...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages