Microsoft
Software
Hardware
Network
Question : Find Duplicate Query
Hi all,
I have a 'Find Duplicate' query that returns a list of people. The query returns the PersonID, Name and Order Date. The duplicate is based on the PersonID.
What I am wanting is the query to just return a single record for the Person - and I want that record to be the latest Order Date.
Is this possible?
Thanks,
Tom
Answer : Find Duplicate Query
try this query
select * from tableX
where [Order Date] in
(select max([Order Date]) from tableX group by PersonID)
Random Solutions
SQL Select statement
Booting of DVD on HP Proliant ML150 G6
Problems inserting an image on the signature inside OWA
Do...Loop alternative
Global import into SQL Server 2000 related question
How to highlight certain cells in a Excel work sheet column without sorting the column?
how can i put a username and password of ms access dtabase?
cannot see some workgroup computers
SBS 2008 Error messages
Try to open a Silverlight project on Visual Studio 2008 but I can't