>SELECT iif(isempty(field1),0,1) as myfield FROM mytable
>
>I want to use IIF and isempty in SQL 2000
There's no empty() function in Sql Server. For character field you can use LEN(myfiled) = 0 to check if it's empty. CASE function can be used in place of IIF(). It's even better than IIF() because you can check multiple conditions w/o embeded calls to CASE function.
SELECT CASE WHEN LEN(filed1)=0 THEN 0 ELSE 1 END AS myfield ;
FROM mytable
--sb--