Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server Syntax IIF()
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00053526
Message ID:
00053536
Views:
24
>>I just ported my data to SQL Server 6.5 and I was wondering if there is any substitute for the IIF() that I used in a few views. For example: Select Site_ID,IIF(Flag="X","Passed","Failed") From xTable.
>>
>>Any clues are appreciated. tia
>
>Use 'CASE' (I am not sure that I remember right syntax) :
>Select 'newfield'=CASE When Flag="X" Then "Passed" Else "Failed" End
>From xTable

That may do the trick!

Thanks! {:-)
Steve Medvid
Systems Analyst

Environmental Resource Management
Previous
Reply
Map
View

Click here to load this message in the networking platform