Thread: Using Distinct
View Single Post
 
Old December 1st, 2007, 10:06 AM
Smeghead Smeghead is offline
Registered User
 
Join Date: Nov 2007
Location: , , United Kingdom.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks. Didn't quite have the desired effect. I think the problem is, I have only one column that's the duplicate, so its trying to find a way to bring back the results, eliminating or removing the duplicate row.

Scenario: I have multiple contacts at the same address which means they all have the same phone number. I only want to return the first contact, using the same phone number. So only one contact is returned.

Example: Mr John Smith, 17 The Street, London, 123456789
         Mrs Jean Smith 17 The Street, London, 123456789


I want to bring back Mr John Smith or Mrs Jean Smith but not both.

I'm really struggling trying to find the best way round this. It may not work using distinct. I'm now investigating other functions that may well have the desired effect.

Any ideas gratefully received