vollt icon indicating copy to clipboard operation
vollt copied to clipboard

ORDER BY does not accept table_name.column_name

Open almicol opened this issue 5 years ago • 1 comments

A query like:

SELECT this.*, RA2000, DEC2000 from VVV_MPHOT_Ks_V2 as this, VVV_CAT_V2 as source_catalog
where this.SOURCEID = source_catalog.SOURCEID
ORDER BY this.SOURCEID

fails because the ORDER BY contains a dot; the error message is:

Incorrect ADQL query: Encountered ".". Was expecting one of: <EOF> "," ";" "ASC" "DESC" "!

The way out would be to assign an alias to the "this.SOURCEID" column, but that would require painfully expanding this.* and list all the columns of the table "this", which the user clearly does not want to do.

Could TAPLIB support the syntax table_name.column_name in the ORDER BY?

almicol avatar Apr 12 '19 11:04 almicol