Hi all,

I've got trouble with the following request:

from ResultAnnotation ra where
ra.group.job.name='XPLE-B34' and ra.severity='FAILURE'
and not (ra.target, ra.detailTarget) in (select rb.target,
rb.detailTargetfrom ResultAnnotation rb where
rb.group.job.name='XPLE-B33' and rb.severity='FAILURE')


and I get this exception:

org.hibernate.exception.SQLGrammarException: could not execute query
   at org.hibernate.exception.SQLStateConverter.convert(
SQLStateConverter.java:67)
   at org.hibernate.exception.JDBCExceptionHelper.convert(
JDBCExceptionHelper.java:43)
   at org.hibernate.loader.Loader.doList(Loader.java:2223)
...
Caused by: java.sql.SQLSyntaxErrorException: Syntax error: Encountered ","
at line 1, column 595.
   at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
Source)
   at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
Source)
   at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
Source)
   at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
Source)
   at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown
Source)
   at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown
Source)
   at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown
Source)
....
Caused by: org.apache.derby.impl.jdbc.EmbedSQLException: Syntax error:
Encountered "," at line 1, column 595.
   at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
   at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
...

What am I doing wrong ?

It seems the problem comes  from the use of tuple
Does Derby support row value constructor syntax (tuple syntax)?
If not, how can I rewrite my query to bypass this limitation?

thanks

Mathieu

Reply via email to