Eval() causes a runtime error

22 views
Skip to first unread message

Hung Tran

unread,
Apr 21, 2016, 5:37:37 AM4/21/16
to OrientDB
Hi,

My test is on OrientDB v2.1.8 (strictSql = false). 

In OrientDB studio, I could not perform the SQL as following

select eval('(Perform.EndDate - Perform.BeginDate)/1000'), Statistics.NumSend from Campaign where Status = 4

due to an error

com.orientechnologies.orient.core.exception.OQueryParsingException: Error on parsing command at position #0: Error on parsing query Query: (Perform.EndDate - Perform.BeginDate)/1000 ------^
 
--> com.orientechnologies.orient.core.exception.OSerializationException: Found invalid ) character at position 17 of text Perform.BeginDate)/1000. Ensure it is opened and closed correctly.

I don't see where is invalid ) character in the SQL above. Remark, there is no problem if not do /1000.

Any help will be very appreciated!

My Best,
Hung Tran

alessand...@gmail.com

unread,
Apr 21, 2016, 5:53:50 AM4/21/16
to OrientDB
Hi Hung,
try with select eval('(Perform.EndDate - Perform.BeginDate) / 1000'), Statistics.NumSend from Campaign where Status = 4

Best regards,
Alessandro
Reply all
Reply to author
Forward
0 new messages