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?