on 04-08-2010 9:03 PM
Hi ALL,
We have a custom program , which has a seletc statement which fetching the data from SAP tables from oracle in sorted order, but now we migrated to DB6 and same select statement is fetching the data not in sorted order.
Kindly help me understand this.
Ahmad,
Also note that the default collating sequence used is different for different database vendors. I have noticed a difference while sorting the same data set in SQL server and DB2.
- Sameer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sameer,
thats is indeed something that should not happen if both databases belonged to an SAP system of the same codepage ( unicode or non-unicode ).
SAP application servers buffer some tables. The SAP system relies on the fact that the binary sorting order of buffered data in the application server is the same as the sorting order of the database when a ORDER BY clause is applied.
Regards
Frank
Hi Ahmad,
as long as the SQL statement does not contain a ORDER BY clause, the database optimizer is free to choose an access plan that does not return the data in sorted order (e.g. a TBSCAN ). You may just have been lucky that ORACLE decided to return the data in sorted order.
Regards
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It might help, if you could show us your actual select statement.
Is there an order by clause in it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.