jon100
asked on
Easy SQL: Return 'Demo' or 'Live' - instead of True or Fals on bit field
SQL Server 2000.
I have a bit field - that returns True of False (obviously) (eg SELECT mybitfield from mytable).
returns
True
False
True
How can I return, say, 'Demo' if true is returned - and 'Live' if false?
Thanks!...
I have a bit field - that returns True of False (obviously) (eg SELECT mybitfield from mytable).
returns
True
False
True
How can I return, say, 'Demo' if true is returned - and 'Live' if false?
Thanks!...
ASKER
thanks.
one more quick thing - how can i get that to return a column heading?
one more quick thing - how can i get that to return a column heading?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
excellent - thanks a lot
case when mybitfield = 1 then 'Demo' else 'Live' end
from
mytable