Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I get just the latest edit dates
Message
From
21/03/2005 13:00:27
 
 
To
21/03/2005 12:58:11
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00997819
Message ID:
00997899
Views:
10
If all you want is the latest dates, follow Sergey's example. If you mean you want the most recent date for a specific part, you need to follow this example:

You need to do what's called a "correlated sub-query". I haven't done one in a few, so If I make a mistake in this example, I'm sorry but it's something like:

Select location, part, editdate from inventory A where editdate = (select
max(editdate) from inventory B where b.part = a.part and b.location = a.location)

Pf
>
>>IF I wanted to just get the latest edit dates from a table
>>
>>i.e.
>>
>>select location, part, editdate
>>Form inventory
>>
>>How would I just get the records from the most recent editdate?
>>
>>Thanks
>>Jim

(On an infant's shirt): Already smarter than Bush
Previous
Reply
Map
View

Click here to load this message in the networking platform