Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 29th, 2003, 09:52 PM
antonindes antonindes is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 1 antonindes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Removing Duplicate Fields

Hi All,

I've been working on this problem for 2 days now and I can't find a solution

I have a database in which looks a little like this

ID Name Address
1 anton 32 algi rd
2 lesly 24 smith st
3 bianca 32 algi rd
4 brian 92 faraday cres
5 bill 32 algi rd.

I want a query that will enable me to display all the names and addresses however if the Address is a duplicate (as in ID's 1, 3, 5) I don't want it to display the address 3 times. I only want it to display once.

However it gets more complicated I want one of the names (either anton bianca or lesley doesn't matter which) to show up with the address.

In other words I want the Query to output

ID Name Address
1 anton 32 algi rd
2 lesly 24 smith st
4 brian 92 faraday cres.

I have tried the

SELECT DISTINCT Address FROM Details

However I need the name and ID's to show up with the address!

Thanks very much in advance,

Anton

Reply With Quote
  #2  
Old December 7th, 2003, 04:18 AM
Jim Lanham Jim Lanham is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 2 Jim Lanham User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I think that you can use the 'find duplicateswizard' available from the drop down when creating a new query.
If that option is not available I think that you have to insert the disk you loaded Access from and add the additional wizards.
I hope this helps.

Jim

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft SQL Server > Removing Duplicate Fields


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT