General information
Forum:
Microsoft SQL Server
>> 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
Thanks, I'll give it a look.
Mike
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only