Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using max() command correctly in sql
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00692081
Message ID:
00692496
Vues:
22
Sorry, I thought you were looking for the first record in the group based on alphabetical order. I am getting the correct results with this query, but I am working with a small dataset, and am not sure that VFP is guaranteed to always get the last record:

SELECT Table1.id, Table1.vname, Table2.Name ;
FROM Table1 INNER JOIN Table2 ;
ON Table1.id = Table2.id ;
GROUP BY 1

>Oops, I found a problem again. What I really need is to find the last entry made for id = 100 and 200. My answer that I am looking for is cindi and angie since they are the last entries. The min() worked for some items when I used this on productions record which contains a hundred or so Items. Any suggestions?
Chris McCandless
Red Sky Software
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform