Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL: ORDER BY clause is invalid
Message
De
02/04/2005 17:42:46
 
 
À
02/04/2005 16:59:43
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Novell 5.x
Database:
Visual FoxPro
Divers
Thread ID:
01000629
Message ID:
01001049
Vues:
42
<snip>

>2) In previous versions only ordering was done depending on base table field country.
>
>This was a bug in previous versions that might not be accepted as a bug (to ANSI SQL it's a bug).
>

But !!!!! MS SQL
CREATE TABLE #tree (id INT,parentId INT NULL)
INSERT INTO #tree VALUES (1,2)
INSERT INTO #tree VALUES (2,1)

SELECT id AS parentId,parentId as id FROM #tree ORDER BY parentId
-- this return different order !!!
SELECT id AS parentId FROM #tree ORDER BY parentId

DROP TABLE #tree
MS SQL is ANSI SQL ok or not ?

If not, then this is a very bad behaviour,
if yes then ANSI SQL is very bad,
if this is the UNIVERSE SQL standard, it is bad.

Update: i read ANSI SQL92 ORDER BY rules,
it is ok, the column_name it has priority;
then MS SQL is not "ORDER BY" ANSI SQL92 compliant,
i Check SYBASE 9 and it is compliant.

I look a caos into this obvious rule! Incredible.

Someone have a link where exists a backends full comparison ?

Fabio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform