I think this should do it in any case --
decimal(ROUND(READINGVALUE,2), 31, 2)
It turns out that this works just fine when I run it from the command line.. but I really want this value returned as a part of a stored procedure. I have an OUT parameter READINGVAL which is of DOUBLE type and decimal(ROUND(+3.84000020000000E+001,2), 31, 2) is assigned to it and returned.
When I run the procedure, I still get it in the long scientific format --
Parameter Name : READINGVAL
Parameter Value : +3.84000000000000E+001
Any way around this? Should I return it as a string instead?
I tried it with the output parameter as DECIMAL type where I'm doing something like --
SET READINGVAL = DECIMAL(ROUND(+3.84000020000000E+001,2), 31, 2); and it returns "38." instead of "38.40"
Thanks!