Link to home
Start Free TrialLog in
Avatar of Philippe Renaud
Philippe RenaudFlag for Canada

asked on

SQL rounding problem

Hello EE,

lets say I have this code:

DEClare @test decimal(10, 4)

set @test = 333.3334


How could I do a select that returns 2 decimals, but   like that:   333.34

because I have a 4 at the end... I would like to show 333.34  
the thing is that I saved inside table as money and it saves 4 decimals. I have a 4 at the fourth decimal.

any ideas.. ?
Avatar of Ephraim Wangoya
Ephraim Wangoya
Flag of United States of America image


select Round(@test, 2)
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Philippe Renaud

ASKER

ahhh floor works....!

thanks angel
sorry I meant Ceiling  *100