A query gets a parsing error with LIMIT statement

27 views
Skip to first unread message

Hung Tran

unread,
Jan 12, 2016, 3:48:34 AM1/12/16
to OrientDB
Hi,

I am migrating from version 1.7.8 to version 2.1.8, the SQL below does not working any more

SELECT eval('$TotalListsQuery[0].Count') AS TotalLists
     LET $TotalListsQuery = ( SELECT Count(1) AS Count FROM ContactList WHERE Account=#20:1 AND EntityInfo.State=0)
  LIMIT 1

It is working if remove "LIMIT 1"

My Best,
Hung Tran

user.w...@gmail.com

unread,
Jan 12, 2016, 4:06:50 AM1/12/16
to OrientDB
Hi Hung,

Try this:

SELECT first(eval('$TotalListsQuery[0].Count')) AS TotalLists
LET $TotalListsQuery = (SELECT Count(1) AS Count FROM ContactList WHERE Account=#20:1 AND EntityInfo.State=0)

Regards,
Michela


Luigi Dell'Aquila

unread,
Jan 12, 2016, 4:08:34 AM1/12/16
to orient-...@googlegroups.com
It seems to be a bug, could you please open an issue about this?

Thanks

Luigi


--

---
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 orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hung Tran

unread,
Jan 12, 2016, 4:38:52 AM1/12/16
to OrientDB
Hi Luigi,

An issue is created

https://github.com/orientechnologies/orientdb/issues/5589

My Best,
Hung Tran
Reply all
Reply to author
Forward
0 new messages