Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert IIF function in SQL Statement
Message
 
To
31/03/2003 22:36:56
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00772247
Message ID:
00772321
Views:
8
What is the database engine on which this query will be runned?

Access recognize IIF but SQL Server needs a CASE.


>Is it possible for me to insert IIF function in SQL Statement.. for example:
>
>SELECT MONTHLYSALES.*, IIF(MONTHLYSALES.POINT gt=10, "Good", IIF(MONTHLYSALES.POINT gt=5 AND MONTHLYSALES.POINT lt 10, "Enough", "Bad")) as SALESPOINT FROM MONTHLYSALES ORDER BY SALESMANCODE
>
>(pls correct the above SQL statement if there's mistake)
>
>any idea would be greatly appreciated and many thanks in advance
>
>Regards
>Winan
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform