Kbase 8836: SQL: Situation where the 'order by' clause is ignored as fol
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
SQL: Situation where the 'order by' clause is ignored as fol
900212-dah02SQL: Situation where the 'order by' clause is ignored as follows:
In a query involving both group by and order by, the order by clause
is effectively ignored if if does not sort either the aggregated
column or the grouping column(s) in the order specified by the 'group
by'.
EX: select count(*), st, city from customer group by st, city order
by city, st.
The above EX will not sort properly since the 'order by' list 'city,
st'; if it had listed 'st, city' as the "group by" clause does, then
it would work properly. (This is of course a bug.)
Progress Software Technical Support Note # 8836