>Hi,
>I'm trying to use iif within a select statement but U can't get anything to work.
>I have a field containing character values '0' or '1' an I want to return a different character string depending on the value.
>Can you use iif() within a select statement?
Sql Server doesn't have IIF() function but you can use more powerfull CASE function.
... CASE myfield
WHEN '0' Then 'Zero'
WHEN '1' Then 'One'
ELSE '???' END
CASE
WHEN myfield = '0' Then 'Zero'
WHEN myfield = '1' Then 'One'
ELSE '???' END
--sb--