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 12:58:11
 
 
To
21/03/2005 10:06:58
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00997819
Message ID:
00997897
Views:
12
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
Next
Reply
Map
View

Click here to load this message in the networking platform