orientdb icon indicating copy to clipboard operation
orientdb copied to clipboard

SQL: Multi-column ORDER BY does not default to ASC and throws Exception

Open dxxr opened this issue 12 years ago • 1 comments

OrientDB v.1.6.3

If an SQL command contains a multi-column ORDER BY, an exception will be thrown if the direction is omitted for any but the last entry.

orientdb> SELECT FROM OUser ORDER BY status, name

Error: com.orientechnologies.orient.enterprise.channel.binary.OResponseProcessingException: Exception during response processing.
Error: com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error on parsing command at position #33: Ordering mode 'NAME' not supported
. Valid is 'ASC', 'DESC' or nothing ('ASC' by default)
Command: select FROM OUser ORDER BY status, name
-----------------------------------------^
orientdb> SELECT FROM OUser ORDER BY status ASC, name
...
3 item(s) found. Query executed in 0.007 sec(s).

dxxr avatar Mar 06 '14 09:03 dxxr

fixed in 2.1 snapshot

luigidellaquila avatar Feb 16 '15 16:02 luigidellaquila