Hi Luca, I have tried with both ways, they did not work, they throw same exception above.
String rawSQL = "..." OSQLSyncQuery query = new OSQLSyncQuery(rawSQL); database.query(query); // does not work OCommandSQL command = new OCommandSQL(rawSQL); database.query(command).execute(); // does not work either Remark, Segments is a LinkSet for ContactList. My Best, Hung Tran On Wed, Aug 6, 2014 at 5:11 PM, Luca Garulli <[email protected]> wrote: > Hi Hung, > How do you cal that SQL form Java API? > > Lvc@ > > > > On 6 August 2014 11:45, Hung Tran <[email protected]> wrote: > >> Hi, >> >> Today, I have played with a SQL as following >> >> SELECT FROM ContactList >> LET $a = (SELECT count(1) FROM Contact WHERE OwnedBy = >> $parent.$current.@rid) >> WHERE Segments.size() > 0 AND $a[0].count > 0 limit 1 >> >> 1/ Orient Console returns 1 record as expected >> >> 2/ JavaAPI throws an exception >> >> OCommandSQLParsingException: Invalid keyword 'SEGMENTS.SIZE' >> >> I am using OrientDB v1.7. Is there any workaround for v1.7? >> >> Cheers, >> Hung Tran >> >> -- >> >> --- >> You received this message because you are subscribed to the Google Groups >> "OrientDB" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- > > --- > You received this message because you are subscribed to a topic in the > Google Groups "OrientDB" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/orient-database/veY3mrrw2O0/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Hung Tran -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
