idrisgani (7/2/2009)
Thanks for the Reply. I have already tried with converting the real into decimal before converting to VarcharDeclare @real real
Set @real=Input
print Round(Convert(varchar(30),Convert(Decimal(15,7),@real)),2)
If Input = 19.005, expected Result is 19.01. but i cant able to reproduce the same. Actual result is 19
i can able to achieve the result when Input = 19.0051( Result is 19.01).
Based on that reply, I'm thinking that you didn't try Peso's code which actually does work. Don't assume that just reading the code will be your answer. Try it. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.