Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need Assistance With Query
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00983969
Message ID:
00983971
Vues:
16
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform