Hi,
See this link
<http://orientdb.com/docs/last/Release-2.1.0.html#strict-sql-parser>
ALTER DATABASE custom strictSql=false
You might have to rewrite some of your syntax.
Regards
S
On Tuesday, 12 January 2016 00:19:58 UTC+5:30, Hung Tran wrote:
>
> 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?
>
> I have tried to keep it in simple version
>
> SELECT FROM Invoice LET $__current = (SELECT FROM $parent.$current), $v1 =
> [email protected]
>
> but it is still getting a parsing error.
>
> 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.