You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by vkulichenko <va...@gmail.com> on 2016/04/01 00:08:22 UTC

Re: Help with SQL delete syntax on an Ignite Cache

Hi,

Can you please properly subscribe to the mailing list so that the community
can receive email notifications? Here is the instruction:
http://apache-ignite-users.70518.x6.nabble.com/mailing_list/MailingListOptions.jtp?forum=1


limabean wrote
> I need to run something like this:
> "delete from PretendPerson where companyId = ?"
> 
> When I attempt to run a delete statement, I end up with a peculiar error
> message in the stack trace:
> 
> Caused by: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement
> "SELECT ""PretendPerson"".PRETENDPERSON._KEY,
> ""PretendPerson"".PRETENDPERSON._VAL FROM ""PretendPerson"".PRETENDPERSON
> WHERE DELETE FROM[*] PRETENDPERSON WHERE COMPANYID = ? "; SQL statement:
> SELECT "PretendPerson".PretendPerson._key,
> "PretendPerson".PretendPerson._val FROM "PretendPerson".PretendPerson
> WHERE delete from PretendPerson where companyId = ? [42000-175]
> 	at org.h2.message.DbException.getJdbcSQLException(DbException.java:332)

SQL updates are currently not supported, but this is on the roadmap. For now
you should use IgniteCache API to remove entries (see 'remove' and
'removeAll' entries).

The exception is indeed confusing, I created a ticket to fix it:
https://issues.apache.org/jira/browse/IGNITE-2928

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Help-with-SQL-delete-syntax-on-an-Ignite-Cache-tp3822p3828.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.