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

How to eliminate selecting repeats in a statement

P: 31
I need a sql statement that doesn't select any record that has already been selected with the same data in a field.

In other words, if I had these 3 records in the form of NAME, ID, and PHONE

MATT, 333, 000-000-0000
MATT, 333, 000-000-0000
STEVE, 555, 000-000-0000
RICK, 444, 000-000-0000

I want to eliminate selecting MATT more than once. So the total record count would be 3 and there would only be one MATT. I've had a ton of trouble getting sql srv to play ball on this. I was hoping somebody could help me out.
Feb 17 '09 #1
Share this Question
Share on Google+
1 Reply


ck9663
Expert 2.5K+
P: 2,878
Use DISTINCT


-- CK
Feb 17 '09 #2

Post your reply

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