>Hello at alls.
>
>I wonder to know how many IIF nested Can I put inside a query.
>
>TIA.
I have seen 10 or 12 nested IIFs. But your program would be more readable if you create a UDF that returns the value.
For instance, instead of:
iif(cMonth = "JAN", 1, iif(cMonth = "FEB", 2, ...
you could use:
FUNCTION MonthNum(cMonth)
do case
case cMonth = "JAN"
return 1
case cMonth = "FEB"
return 2
...
HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)