Quantcast
Channel: SCN : All Content - ABAP for SAP HANA
Viewing all articles
Browse latest Browse all 831

Sorting Order in SQL Queries

$
0
0

Hi Colleagues,

 

We notice difference in the output when executing the SELECT queries on traditional DB and HANA. We are using side car approach so we have both the databases.

 

    SELECT Query 1 without HANA

 

     SELECT * FROM

                     EKPO

          INTO   TABLE LT_EKPO

             FOR ALL ENTRIES IN LT_EKKO

    WHERE    ebeln = lt_ekko-ebeln

          AND   werks IN s_werks.

 

    SELECT Query 2 with HANA

 

     SELECT * FROM

                     EKPO

          connection (gv_dbcon)

          INTO   TABLE LT_EKPO

             FOR ALL ENTRIES IN LT_EKKO

    WHERE    ebeln = lt_ekko-ebeln

          AND   werks IN s_werks.

 

 

Both the queries give me the same result set, but with different order.

What could be the reason? and how this should be avoided.

Thank you.

 

Regards,

Harshad Mishrikotkar.


Viewing all articles
Browse latest Browse all 831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>