Link to home
Start Free TrialLog in
Avatar of bbraman
bbraman

asked on

sql server 2005 opposite value function

I'm not sure what to call this, but I need a SQL Server function that will return the opposite of the value of a column, so that if the column contains a 1 a 0 is returned, and if it contains a 0 a 1 is returned.  If it contains anything other then a 1 or a 0 then the original value is returned unaltered.

I would suspect something like this would be built into SQL Server 2005, but perhaps a custom function is required.

Thanks for considering my request.
ASKER CERTIFIED SOLUTION
Avatar of idmedellin
idmedellin
Flag of Colombia 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
SOLUTION
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