Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT SQL and MAX()
Message
 
 
À
23/01/2002 12:59:08
Lutz Scheffler (En ligne)
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00609149
Message ID:
00609504
Vues:
18
Hi Agnes,

VFP returns values for the fields not included in the GROUP BY clause from the last physical record in the group not from the record with MAX()/MIN() value.

>SELECT;
> Work_Table.Code,Key_Table.Key,MAX(Ref_Table.Code);
> FROM Work_Table;
> INNER JOIN Ref_Table;
> ON Work_Table.Code=ALLTRIM(Ref_Table.Code);
> GROUP BY 1
>
>
>The result is, that I get the correct Code from Ref_Table, and a wrong Key.
>
>What's wrong with my statement?
>
>Thanks for Help
>
>Agnes
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform