> I am currently using ASP against a SQL 7 server for data display. In FoxPro, I can use an IIF statement to set a variable value according to the evaluation of the IIF statement.
>i.e. that = IIF(thing = 'N', "No", "Yes")
>
>Is there such a function in SQL? Or will I be doing Begin, If, Else, End
statements?
Look at the CASE expression in the SQL Server Books Online
DECLARE @t int
SELECT @t = CASE WHEN condition1 THEN value1 ELSE value 2 END
-Mike