Skip to Content
0
Jun 24, 2020 at 03:55 PM

SAP HANA DB order by is not giving proper output

377 Views

Hi All

I am trying to sort the data in HANA DB with SQL scripts. But the results are not giving correct. Please have a look at my script how it can be modified to get the correct result.

select  condition_scale_quantity
from sdpricing_cond_qtyscale_enr
where condition_record_number = 556
order by condition_scale_quantity asc;
rate_where_no_scale_exists desc;

Its give the output as follows

1,10,100,1000,10000,25,250,2500,25000,50,500,

But i need the output as

1,10,25,50,100,250,500,1000,2500,10000.

I tried many ways its giving the similar result.

Thanks and Regards

Vijay