Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can you use IIF(a,b,c) in a SELECT statement?
Message
From
14/11/2000 12:07:33
 
 
To
13/11/2000 14:34:09
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00440969
Message ID:
00441655
Views:
9
>>>SELECT IIF(alias.gender = "M", "Male", "Female") AS GenderText FROM Customers
>>that works...thanks...:)
>
>IIF won't work in SQL Server though, if that applies. Your best bet, to make it scaleable or simpler in VFP would be to have a table like this:
>
gender.dbf
>code	gender
>--------------
>m	Male
>f	Female
>and then build your SQL like this:
>
>SELECT gender.gender FROM alias LEFT JOIN gender ON alias.gender = gender.code
------------
ok Mike - thanks for the reply...:)
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Previous
Reply
Map
View

Click here to load this message in the networking platform