Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Statement, How to?
Message
De
04/04/2001 11:44:45
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SQL Statement, How to?
Divers
Thread ID:
00491913
Message ID:
00491913
Vues:
56
I have an Invoice table with 4 fields in which I need to pull that last invoice for a file_num.

SELECT Invoice.invoice, MAX(Invoice.date), Invoice.amount, Invoice.file_num FROM openclose!invoice GROUP BY Invoice.file_num

This gives me the Max date for a file_num but the invoice and amount don't match up with the date.

How can I get the Last invoice based on the invoice date?

Thanks in advance.

Derick Carlson
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform