> (CASE WHEN LEN(BatchNo)= 0 THEN '' ELSE Used_By END) AS Used_By; >>>How can I do this field selection that uses VFP's IIF() in SQL?
>> >>SELECT Id, EntryDate, TranDate, BatchId, EntityId, Count(*) AS Cnt, BatchNo,; >> IIF(Empty(BatchNo),SPACE(Len(Used_By)),Used_By) AS Used_By; >> FROM Resh; >> WHERE Resh.Status == " " AND; >> ModTStamp > nDateFrom; >> GROUP BY Resh.BatchId, Used_By; >> ORDER BY TranDate; >> INTO CURSOR Temp1 >> >>>>