Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can this be done in one SQL Select?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00984864
Message ID:
00984900
Views:
34
>>
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform