Oninit Logo
The Down System Specialists
+1-913-674-0360
+44-2081-337529
Partnerships Contact
Finderr

-374 Can only use column number in ORDER BY clause with UNION.

This query has both a UNION clause and an ORDER BY clause. In a union query, in which multiple SELECT statements exist and the names of the selected columns in each statement are not necessarily the same, you cannot use column names or expressions in the ORDER BY clause.

Instead, you must use column position numbers, with 1 representing the first selected column, 2 representing the second, and so on. Rewrite the query to use only numbers in the ORDER BY clause.