Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL to retrieve maximum value from a row.
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SQL to retrieve maximum value from a row.
Divers
Thread ID:
00305138
Message ID:
00305138
Vues:
44
I have a table containing a key, date and 48 values for each record.
I need to retrieve the maximum value for each key for each month - but this value may be any of the 48 values - e.g.
Key Date f1 f2 f3 f4
A00408, 01/02/1999, 12, 15, 16, 18
A00408, 01/02/1999, 13, 18, 20, 22
I need to return the maximum value and field in the example above it would be f4 and 22. You can do this in Excel using the MAX() function and providing a range. Would my best best be to paste this data into Excel and use Max() or can it be done in 1 or a couple of SELECT statements.

Thanks,
Martin
If only everything in life was as reliable as VFP
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform