Kbase 18149: UNION or UNION ALL with ORDER BY error 4464
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  7/29/1998 |
|
UNION or UNION ALL with ORDER BY error 4464
** Cannot ORDER BY a column not in the selection list. (4464)
** Could not understand line 1. (196)
If you get the above error while trying to do
UNION or UNION ALL with an ORDER BY fieldname,
change the fieldname you're using as sort-criteria with
column number of that field.
The last line on the example program (r-union2.p)
found on pages A-44 v8.x, A-39 v7 of the SQL Guide and
Reference should read:
ORDER BY 1.
The reason for this is that SQL89 says the columns resulting
from a UNION or UNION ALL are unnamed.
Therefore the ORDER BY must refer to selected
expressions numerically rather than by name
ama 7/29/98