|
Define a custom function e.g. ProcessBit taking the bit value as a parameter
e.g.
CREATE FUNCTION dbo.ProcessBit( @booVal bit)
RETURNS varchar(20)
AS
BEGIN
IF @booVal --should default to true
RETURN 'True String'
ELSE
RETURN 'False String'
END
then
SELECT ProcessBit(fieldname) AS "Result" FROM tablename
Note this is not checked code, just a rough example!
Tom Jones
MCT, MCSE (2000:Security, 2003), MCSA:Messaging & Security, MCDBA, MCDST, MCITP, MCTS, MCP, Sec+
PhD, MSc, FIAP, MIITT
ICT Trainer / Consultant
Ossian Ltd
Scotland
|