Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Statement
Message
From
19/04/2006 12:13:42
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01114622
Message ID:
01114637
Views:
18
>>Can anyone help me with an SQL Command that can extract the record with the latest DATETIME from a set of records that belong to the same Customer ID. I did it once but I cannot remember how.
>>
>
SELECT CustomerID, MAX(DateTimeField) AS MaxDT FROM mytable GROUP BY CustomerID
Sergey

How does this ensure that it's the max/latest for a given Cust_ID?

Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform