Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Latest price GROUP problem
Message
De
18/11/2013 22:51:22
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Latest price GROUP problem
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01588299
Message ID:
01588299
Vues:
60
Hi All:

Consider
Item#          Date        Price
1111           2/3/04      111.22
2222           2/3/05      111.22
3333           2/3/06      111.22
4444           2/3/07      111.22
1111           2/3/08      222.22

Select Item, max(date), Price ;
from foo ;
group by item ;
into cursor boo
I want the latest price, so this would be the result:
Item#          Date        Price
2222           2/3/05      111.22
3333           2/3/06      111.22
4444           2/3/07      111.22
1111           2/3/08      222.22
Problem is that VFP doesn't like this and generates an error GROUP BY clause missing. How do I solve this?

Thanks,

Yossi
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform