Consultor Eletrônico



Kbase P108132: ORDER BY within a SELECT DISTINCT causes the wrong result set to be returned
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/16/2008
Status: Unverified

FACT(s) (Environment):

Progress 9.1x
OpenEdge 10.0A

SYMPTOM(s):

ORDER BY causes the incorrect result set to be returned

The query is using SELECT DISTINCT

The field in the ORDER BY clause does not appear in the SELECT list

Error 7645 is not returned

Bad field specification in order by clause (7645)

CAUSE:

Bug# 20050825-010

CAUSE:

Using a sort key, in the ORDER BY clause, which is not in the SELECT list is not supposed to be allowed (according to the SQL-92 standard) and should return an error and not a result set.

FIX:

Upgrade to Progress 9.1E Service Pack 3 / OpenEdge 10.0B or higher.
The SQL-92 engine will now return an error message.