Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Selecting data where field = max(field)
Message
De
02/11/2011 19:02:09
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Selecting data where field = max(field)
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01527898
Message ID:
01527898
Vues:
74
PLEASE NOTE --- VFP8

I need to get the records for a department based on the last time it was printed. I've got
SELECT dept,MAX(printtime) as pt ;
   FROM prn_status ;
   WHERE wono = ww ;
   GROUP BY dept ;
   INTO CURSOR curTemp

SELECT p1.* ;
  FROM prn_status p1 ; 
    JOIN curTemp ct  ON p1.dept = ct.dept AND p1.printtime = ct.pt ;
  WHERE p1.wono = ww;
  INTO CURSOR crsData
Is there a simple way to combine this into one query?

Thanks to all..............Rich
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform