Solved

How to select only the first match ?

Posted on 2004-04-15
3
569 Views
Last Modified: 2008-03-06
I have a table with loads of duplicates (not real ones, but like with a "-" in one and not in an other etc ...)

So, the comapy names are differents, but the phone number is the same.

I would like to create a querry that only take the first match for each phone number, and leave the other ones ... so i only have 1 company by phone number ...


Thanks
0
Comment
Question by:Sebuturn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Expert Comment

by:GDE
ID: 10830988
In oralce it`s be, for example,
select * from your_table where rownum<2

Best regards
Dmitry.
0
 

Author Comment

by:Sebuturn
ID: 10831013
Oh yeah .. i m using access
0
 
LVL 25

Accepted Solution

by:
lwadwell earned 70 total points
ID: 10831061
what do you really mean by 'first match'...if you did a 'group by phone_number' and select 'max(company_name)' or 'min(company_name)' you will get only one company by phone number...
0

Featured Post

Do you have a plan for Continuity?

It's inevitable. People leave organizations creating a gap in your service. That's where Percona comes in.

See how Pepper.com relies on Percona to:
-Manage their database
-Guarantee data safety and protection
-Provide database expertise that is available for any situation

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question