In VFP you'll have to use IIF() or ICASE(). No compatibility, I'm afraid.
> Would the following TSQL work in VFP:-
>
>SUM(case when invh.invdate between lcMonStart AND lcMonEnd then gross else 0 end) as MTDAmount
>
>if not is SUM(IIF ....) the only way out, I am looking for something that is VFP and MSSQL compatible.
--sb--