cancel
Showing results for 
Search instead for 
Did you mean: 

SAP ECC on SQL Server 2019 - Results coming in different sort order

Mofizur
Contributor
0 Kudos

Hi team,

We have recently migrated our applicaiotn from On-Premise to Azure keeping the applicaiotn version same but we had to do backedn SQL server upgraded from SQL 2014 to SQL 2019. Applicaitons are up and running and most of teh funcitonalities are also workign as expected.

However we are facing a starnge problem in SQL 2019 - Select query is giving result sometimes in ascending and sometimes in descedning order. Behaviour is unpredictable.

Our programs are using binary search and I do admit that they are nto sorting before teh search but everything was working back in 2014. Any idea/ docuemntaiton can say that from SQL 2019 this behaviour has changed ?

I knwo I have nto been able to provide enough evidence or data but any pointer would be much appreciated.

Thanks,

Mofizur

View Entire Topic
Mofizur
Contributor
0 Kudos

Hello Clas,

Thanks for your response.

Thank was my feeling as well - wrong coding practice.

This is what I got from SAP as well

"In SQL Server, if the "ORDER BY" clause is not used, the sequence of rows in the selection is indeterminate, and it can vary each time the SELECT statement is executed. The database is free to return the rows in any order it believes most efficient."

We have this system running for almost 7 yeras on SQL 2014 and our funciotnalities were working fine and now all of a sudden when we migrated to Azure on SQL 2019, we could see the difference in behaviour.

I do understand your point and may be indeed it was pure luck that it was working. Is that how we should conslude this?
Or is there any better way to determine this?

Thanks,

Mofizur