Hi, the problem seems to be in the ".@this", but does it actually make sense? What's the reason to have that in the query?
Thanks Luigi 2016-01-11 19:49 GMT+01:00 Hung Tran <[email protected]>: > Hi, > > I am migrating from version 1.7.8 to version 2.1.8, the SQL below does not > working any more > > SELECT IFNULL(@rid, '') AS Id, > IFNULL(Number, '') AS Number, > IFNULL(IssuedDate, '') AS IssuedDate, > IFNULL(Title, '') AS Title, > eval('SubTotal - DiscountAmount') AS Taxable, > IFNULL(GrandTotal, '') AS GrandTotal, > IFNULL(Status, '') AS Status, > IFNULL(1, '') AS __metadata, > IFNULL($v0, '') AS __xf8, > IFNULL($v1, '') AS __xf9, > IFNULL($v2, '') AS __xf10, > IFNULL($v3, '') AS __xf11, > IFNULL($v4, '') AS __xf12, > IFNULL($v5, '') AS __xf13, > IFNULL($v6, '') AS __xf14 > FROM Invoice > LET $v0 = [email protected], > $v1 = [email protected], > $v2 = [email protected], > $v3 = [email protected], > $v4 = [email protected], > $v5 = [email protected], $v6 = > [email protected], > $__currentProjector = (SELECT FROM $parent.$current) > WHERE((IssuedTo = #20:0 OR ToAccount= #20:0) AND (NOT (Number LIKE > '__temp_' + '%'))) AND EntityInfo.State= 0 > ORDER BY IssuedDate DESC LIMIT 10 > > An error is > > com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error > on parsing command at position #0: Error parsing query: SELECT > IFNULL(@rid,'') AS Id,IFNULL(Number,'') AS Number,IFNULL(IssuedDate,'') AS > IssuedDate,IFNULL(Title,'') AS Title,eval('SubTotal - DiscountAmount') AS > Taxable,IFNULL(GrandTotal,'') AS GrandTotal,IFNULL(Status,'') AS > Status,IFNULL(1,'') AS __metadata,IFNULL($v0,'') AS __xf8,IFNULL($v1,'') AS > __xf9,IFNULL($v2,'') AS __xf10,IFNULL($v3,'') AS __xf11,IFNULL($v4,'') AS > __xf12,IFNULL($v5,'') AS __xf13,IFNULL($v6,'') AS __xf14 FROM Invoice LET > $v0 = [email protected],$v1 = > [email protected],$v2 = > [email protected],$v3 = > [email protected],$v4 = > [email protected],$v5 = > [email protected],$v6 = > [email protected],$__currentProjector = > (select from $parent.$current) WHERE ((IssuedTo=#20:0 OR ToAccount=#20:0) > AND (NOT (Number LIKE '__temp_' + '%'))) AND EntityInfo.State=0 ORDER BY > IssuedDate DESC LIMIT 10 Encountered " "." ". "" at line 1, column 471. > Was expecting one of: > <EOF> > <WHERE> ... > <ORDER> ... > <GROUP> ... > <LIMIT> ... > <SKIP2> ... > <OFFSET> ... > <TIMEOUT> ... > <FETCHPLAN> ... > <LOCK> ... > <NOCACHE> ... > <PARALLEL> ... > <UNWIND> ... > ";" ... > "," ... > "," ... > <WHERE> ... > <GROUP> ... > <ORDER> ... > <UNWIND> ... > <SKIP2> ... > <OFFSET> ... > <LIMIT> ... > <FETCHPLAN> ... > <TIMEOUT> ... > <LOCK> ... > <PARALLEL> ... > <NOCACHE> ... > <NOCACHE> ... > > What is the correct syntax in version 2.1+ for this case? > > Any help will be very appreciated! > > My Best, > 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 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.
