vollt icon indicating copy to clipboard operation
vollt copied to clipboard

CASE statement in ADQLParser & ADQL Reserved Words

Open almicol opened this issue 7 years ago • 6 comments

If I issue a query containing a CASE statement I get an error.

Example: SELECT top 10 CASE WHEN calib_level = 2 THEN 'default' ELSE 'higher_level' END as level FROM ivoa.ObsCore

Error: Incorrect ADQL query: Encountered "calib_level". Was expecting one of: "," "FROM"

Caused by a adql.parser.ParseException at adql.parser.ADQLParser.generateParseException(ADQLParser.java:5917) Encountered "calib_level". Was expecting one of: "," "FROM"

Is CASE supported? Thanks, Alberto

almicol avatar Sep 05 '17 13:09 almicol