0

Hi.

I have strange problem with sql query results. I am joining two tables and displaing result with order by clause. But results on MS SQL and Sybase are different. After removing order by clause in both queries results are equal. I am using the same table so I do not know what is the source of this difference.

2
Contributors
6
Replies
7
Views
8 Years
Discussion Span
Last Post by krokodajl
0

Maybe they use different collations? Resultset is ordered by the collation you use..

0

I think that collations are not used because order attribute is of type smallint

0

OK, I guess the orders are different(or joins), which one is the correct one select and which is not?

0

the queries I used in both cases are exactly the same and using the same database.

0

"After removing order by clause in both queries results are equal. I am using the same table so I do not know what is the source of this difference."
When you add ORDER BY which query sorts the resulset correctly (sybase or ms sql)?

0

ahh. ok :) I have resultset generated from Sybase query. I have rewritten existing code into T-SQL and results I get are not equal so I think that result from Sybase is correct.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.