Hello,
I have a field varchar(20) which stores the price like say 1,450,000 or 270,000 in dollars. Now I want to select the field as numerical so that I can sort is (i.e. use ORDER BY price ). Can anybody tell me how I can do this or if it's possible. Currently if I do the order by as string it shows 1,450,000 first, then 170,000 then 180,000. It shows the 1,450,000 first even though I want it to be from higher to lower.
Thanks.
I have a field varchar(20) which stores the price like say 1,450,000 or 270,000 in dollars. Now I want to select the field as numerical so that I can sort is (i.e. use ORDER BY price ). Can anybody tell me how I can do this or if it's possible. Currently if I do the order by as string it shows 1,450,000 first, then 170,000 then 180,000. It shows the 1,450,000 first even though I want it to be from higher to lower.
Thanks.