Previous Topic: -83 - DATA TYPES IN COLUMN aaaa DO NOT MATCHNext Topic: -85 - ORDER BY MUST FOLLOW ALL QUERIES WHEN PERFORMING A UNION


-84 - ORDER BY ITEMS MUST BE CONSTANTS FOR UNION OF QUERIES

Reason:

In a union, an ORDER BY clause must specify an integer indicating the ordinal position of the column, not the column name.

The SQLSTATE that equates to this SQL return code is 53S06.

Action:

Change the ORDER BY clause to specify the number of the column, not the name of the column.