In my database, I have a column that holds numeric value as string. When I say numeric, it is positive and it could be any one of the following format: '999','999.9','999.99999'. (The precision is uncertain.)
In my sql query, I would like to get the string value and compare it with another numeric value.
I tried to convert both of them to be decimal, but I don't know the precision (If I leave precision blank, the default 0 is taken). If I convert 444444.55 to float I got 444444.54999999999. If I convert 444444.55 to real I got 444444.56. None of them is what I want.
So, How can I convert '999','999.9','999.99999' to be exactly 999,999.9,999.99999 respectively?
In my sql query, I would like to get the string value and compare it with another numeric value.
I tried to convert both of them to be decimal, but I don't know the precision (If I leave precision blank, the default 0 is taken). If I convert 444444.55 to float I got 444444.54999999999. If I convert 444444.55 to real I got 444444.56. None of them is what I want.
So, How can I convert '999','999.9','999.99999' to be exactly 999,999.9,999.99999 respectively?