iif Access SQL? 
Author Message
 iif Access SQL?
Does anyone have an example of something like the Access IIF in SQL views?
This is for a view and not a stored procedure.

Access Example:
IIf(AB='a',1,2)



Wed, 04 Dec 2002 03:00:00 GMT
 iif Access SQL?



Quote:
>Does anyone have an example of something like the Access IIF in SQL views?
>This is for a view and not a stored procedure.

>Access Example:
>IIf(AB='a',1,2)

Use CASE:

SELECT CASE WHEN AB = 'a' THEN 1 ELSE 2 END FROM....

--
Darren Green
SQL/DTS - http://www.swynk.com/friends/green/



Wed, 04 Dec 2002 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. HELP: must convert IIF( ) from Access queries to T-SQL

2. converting iif from access to sql

3. Migrate MS-Access to SQL-Server - iif construction in aggregation query failes

4. Need Access IIF in SQL Server 6.5

5. Problem converting from MS Access to SQL 6.5 (IIF)

6. From Access to Sql Funtion IIf

7. IIF function in sql statement equal to what is used in Access-Query

8. Access 97 - SQL 7. iif statement conversion

9. Access IIF to SQL 7

10. Using IIF - SQL Server and Access

11. upgrading IIF-9.21-UC2 to IIF-9.21-UC3 and select became

12. Sequel server equivalent of Access iif function


 
Powered by phpBB® Forum Software