Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Last transaction of each transaction type
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01508934
Message ID:
01508936
Vues:
50
Try
SELECT * FROM TranLog tl
  WHERE Jobno = "..." AND
     NOT EXISTS (SELECT 1 FROM TranLog WHERE Jobno = tl.Jobno AND TranType = tl.TranType and TranDate > tl.TranDate)

-- or

SELECT * FROM TranLog tl
  WHERE Jobno = "..." AND
      TranDate  =  (SELECT MAX(TranDate)  FROM TranLog WHERE Jobno = tl.Jobno AND TranType = tl.TranType)
>
>I have a LOGFILE table, I was wondring if there was any SQL syntax where I could put into a cursor the last record of each
>type for a given jobno
>
>transaction type is C (4), and could be "NEW","AMEN","DEL","WUP","MIX","MILL" etc
>
>Jobno is C(14)
>
>I want give the option of displaying the date & time that the last tranaction of each type happened for a given job into a grid.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform