problem with syntax of one simple statement

A

Ashley

can anyone help me fix teh syntax of this statement


sum (IFF(ISNULL (column_Date) and IFF(datediff('d', DueDate, getdate())
between 0 and 30, 1 , 0 ))
 
A

Ashley

OOPS
that works
can you help me with this one now

sum ( IIF(ISNULL (OrderDate)) and IIF(datediff('d', #15/10/2003#,
#22/11/2003#) between 0 and 30), 1 , 0)

I get syntax error in this as well
 
J

John Spencer

Try

SUM (IFF(ISNULL (column_Date) and datediff('d', DueDate, Date()) between 0
and 30, 1 , 0 ))
 
D

David Cox

I am not sure what you intend, but I will try (untested):

sum (IFF(ISNULL (column_Date) and (datediff('d', DueDate, getdate()) between
0 and 30), 1 , 0 ))
 
J

John Spencer

OOOPSS That should be IIF not IFF.


John Spencer said:
Try

SUM (IFF(ISNULL (column_Date) and datediff('d', DueDate, Date()) between 0
and 30, 1 , 0 ))
 
Top