>It seems if you use an IIF() statement in a SQL command, it is evaluated only once instead of for each record. For example:
>
>SELECT IIF(column1=.T.,column2,column3) etc...
>
>This will pull all column2 or column3 in the resulting cursor but not combination of each depending upon the value of column1 in each record. Is there a way to do this to pull from both column2 and column3 depending upon value of column1? I must be missing something abvious.
>
>TIA
John,
Ed gave you answer, I do, however, want to mention that you can improve the performance of the query (and simplify it as well) by using SELECT IIF(column1, column2, column3).
George
Ubi caritas et amor, deus ibi est