>I have the following query:
>
>
>SELECT Id, EntryDate, TranDate, BatchId, EntityId, Count(*) AS Cnt, BatchNo;
> FROM Resh;
> WHERE Resh.Status == " ";
> GROUP BY Resh.BatchId;
> ORDER BY BatchId;
> INTO CURSOR Temp1
>
>
>
>Some batches may be in use by other users. It's possible for a batch
>to be used by multiple users. When a batch is in use, the BatchNo field
>will not be zero.
>
>I want to show the user names of the users who have the batch open. The
>User field is "Used_By".
>
>Thanks
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 == " ";
GROUP BY Resh.BatchId;
ORDER BY BatchId;
INTO CURSOR Temp1
Is that enough?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.