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
Photo of Sunil Rawat
NA 24 3.3k 10y
Thanx all to give their valuable time..
0
Photo of Gowtham Rajamanickam
NA 23.9k 2.9m 10y
http://forums.asp.net/t/1031775.aspx?Configuration+Error+allowDefinition+MachineToApplication+beyond+application+level
0
Photo of Gowtham Rajamanickam
NA 23.9k 2.9m 10y
http://forums.asp.net/p/769696/769696.aspx
0
Photo of Munesh Sharma
NA 17.1k 2.4m 10y