Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need Help with SQL Statement
Message
De
19/09/1997 11:09:09
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Need Help with SQL Statement
Divers
Thread ID:
00050724
Message ID:
00050724
Vues:
91
Can anyone tell me if the following can be done in a one line select statement. I cannot seem to get the results I require.

I have one table with the following fields: Customer, Date, Price. I am simply trying to get the last price quoted to the customer.

CustA, 01/01/01, 100
CustA, 01/01/97, 111
CustB, 02/02/96, 200
CustB, 02/02/02., 222

I want my result to be:

CustA, 01/01/97, 111
CustB, 02/02/96, 200

If I use SELECT * FROM myTable ORDER BY Date DESC GROUP BY Customer
I get ...
CustA, 01/01/01, 100
CustB, 02/02/01, 222

Again, I am looking for the last price quoted only.

Any help would be greatly appreciated.

-Isaac Roda
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform