By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,852 Members | 2,116 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,852 IT Pros & Developers. It's quick & easy.

How do I pull latest results when there is duplicate results?

P: 2
Looking to find a way to only pull the latest results if there happens to be duplicate.

When searching a container in our system, if it doesn't have a dupe I want it to pull that information. But if there is a dupe I want the latest one entered.

Is there a way to look at the created day date time to pull the last one created?
Sep 9 '13 #1
Share this Question
Share on Google+
2 Replies


P: 2
Using SQL that is... When the result look like

Pro No. Container Vessel Sailed
559912 GLDU12345678 01/05/2011
1115544 GLDU12345678 3/12/2013


How do I only show the results for Pro 1115544?
Sep 9 '13 #2

Rabbit
Expert Mod 10K+
P: 12,364
Use an aggregate query that returns the max per grouping to join it back to the table.
Sep 9 '13 #3

Post your reply

Sign in to post your reply or Sign up for a free account.