trying to run the following statement in sql mgmt studio
declare @rick as decimal(13,3)
@rick = -.5
select bob = abs(@rick)
any ideas why this won't work?
trying to run the following statement in sql mgmt studio
declare @rick as decimal(13,3)
@rick = -.5
select bob = abs(@rick)
any ideas why this won't work?
You were missing a Set on line 2. With that, I get the proper .5. I.e.:
declare @rick as decimal(13,3)
set @rick = -.5
select bob = abs(@rick)
It works fine over here, bob = 0.500
. What error do you get?