>I need help in selecting records from the following table (simplified):
>
>CUST_ID
>ORD_DATE
>ORD_TIME
>
>For a given date (ORD_DATE), I need to select one order record per customer (CUST_ID) based on the time of order (ORD_TIME). For example, the Order Time should be the latest of the day.
>
>I would appreciate any suggestions.
>
>Thank you.
I suppouse CUST_ID, ORD_Date and ORD_Time are Field names. So try this:
SELECT CUST_ID, ORD_Date, MAX(Ord_Time) AS Ord_Time FROM YourTable GROUP BY Cuts_Id INTO ...
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.