By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE MyTable
(
P_Id int,
amount varchar(50)
)
insert into MyTable values(1,2340.65);
insert into MyTable values(2,4568);
insert into MyTable values(3,10000);
insert into MyTable values(4,2340.40);
4 rows affected
SELECT * FROM MyTable
ORDER BY CAST(amount AS Numeric(10,2)) DESC
P_Id | amount |
---|---|
3 | 10000 |
2 | 4568 |
1 | 2340.65 |
4 | 2340.40 |