cancel
Showing results for 
Search instead for 
Did you mean: 

difference in data fetch from the same select statement from SAP

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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

Frank-Martin
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

Frank-Martin
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

Former Member
0 Kudos

It might help, if you could show us your actual select statement.

Is there an order by clause in it?