IIF Function Under SQL Server 7.0

Question:
Is the IIF function valid under SQL server 7.0? It’s in the SQL Books Online as valid, but none of my stored procedures accept it.

Answer:
The IIF function you refer to in Books Online isn’t part of the T-SQL syntax that your stored procedures expect. Instead it is used when writing code for Microsoft’s OLAP services. In T-SQL you will have to expand the statement to if.. then.. else..

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: