<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