Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can this be done in one SQL Select?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00984864
Message ID:
00984900
Vues:
39
>>
>>SELECT CUST_ID, ORD_Date, MAX(Ord_Time) AS Ord_Time FROM YourTable GROUP BY Cuts_Id INTO ...
>>
>
>Borislav and Jim,
>
>You approach does not allow me to select other fields from the table because of Group By.
>
>Thank you for your help.


How's that? You can select as many fields as you want
SELECT CUST_ID, ORD_Date, MAX(Ord_Time) AS Ord_Time, Field1, Field2....,Fieldn FROM YourTable WHERE Ord_Date = YourDate GROUP BY Cuts_Id INTO ...
(I forgot WHERE clause in first suggestion)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform