Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Books Online example not working
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00609372
Message ID:
00609398
Views:
23
Thanks very much Sergey.

>Hi Terry,
>
>The iif() and isempty() functions are from SQL Server Analysis Services ( Data warehouse). In regular select IIF can be replaced by CASE function and isempty() by LEN(RTRIM(LTRIM(str))) = 0 or str = SPACE(nn).
>
>
>>The example give error near =
>>If I replace the month expression with true I get iif is not a function when
>>it is in books online with a similar example using isempty inside the iif()
>>When I try that I get error: isempty is not a function.
>>
>>
>>select count(1), count(iif(month(registerdate)=1,1,0)) from registerfrom
>>
>>select count(1), count(iif(isempty(registerdate),1,0)) from registerfrom
>>
>>
>>
>>Any ideas?
Previous
Reply
Map
View

Click here to load this message in the networking platform