June 30, 2006 at 2:36 pm
I have a number that is coming from a source where it passes the negative sign and I do not know offhand the size of the number but I know that the number should always come in with a total of 5 places to the right of a decimal place....
IE 4.20000
Because I do not know the ultimate size and because setting the table type as a float causes the number to round...IE 0.00013
looks like 1.2999999999999999E-4
I am intially setting it to a varchar.
I ultimately need to be able to multiply the number by 1000 so I end up with a decimal place of 2. I can't cast on the varchar, I am getting an error
IE select cast(amt as decimal (38, 5)) as amt will not let me convert the varchar to an int...Ultimately I just want to do the multiplication and then set it to a decimal. If anyone has a suggestion, I'd love to hear it...
July 2, 2006 at 9:04 pm
I', a bit confused... you know the number should always come in having 5 decimal places but you want to convert VARCHAR to INT and you ultimately want to "do the multiplication and then set it to decimal"? Can you clarifiy what the heck it is you really want to do, please?
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply