Weird "IIF" problem

Hi,

I seem to be getting a problem running the IIF statement using this particular code:

"iif(((maturity)-(m.dday1)) between 365 and 730, 1, 0) as TERM"

Basically Foxpro is saying that I'm missing a comma in this particular line of code. However, I can't seem to figure out where to place the comma.

Thanks in advance!



Answer this question

Weird "IIF" problem

  • ykgreene

    thanks so much! works like a charm! :)
  • Tran Ngoc

    IIF() is an XBASE command. You are mixing with the BETWEEN SQL construct.

    Try using the BETWEEN() xbase function instead:

    Iif(Between(maturity-m.dday1,365,730),1,0)


  • Weird "IIF" problem