14
Answers

Access IIF to SQL Statement convert



I have access query and I am converting it to SQL Server 2008R2. I'm looking for the equivalent to the Access IIF statement in SQL Server.

Below is the statement I am trying to convert;

 
 
 
 
("select IIF(MAX(bill_bno) IS NULL,1,MAX(bill_bno)+1) from rec_all where rw=0 and iif(month(bill_date)>=1 AND month(bill_date)<=3,year(bill_date)-1,year(bill_date))=" & IIf(Month(Date) >= 1 And Month(Date) <= 3, Year(Date) - 1, Year(Date))) 
Answers (14)
0
Mahesh Chand

Mahesh Chand

2 286.4k 123.7m 20y
.NET doesn't ship with Windows XP but ships with Windows Server 2003. I don't think too many home users (not the Web users b/c you may be accessing ASP.NET web sites) are using .NET today. Only .NET users are IT people.