If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Remove Duplicate Data but Keep One

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-11-03, 11:21
jestrada10103 jestrada10103 is offline
Registered User
 
Join Date: Oct 2002
Posts: 39
Remove Duplicate Data but Keep One

I have the following:

ID FNAME LNAME
1 John Doe
1 John Doe
1 John Doe
2 Joe Doe
2 Joe Doe
2 Joe Doe
3 John Jones
4 Foo Foo


I would like to end up like the following:

ID FNAME LNAME
1 John Doe
2 Joe Doe
3 John Jones
4 Foo Foo



Thanks for any advice
JE
Reply With Quote
  #2 (permalink)  
Old 08-11-03, 11:31
MattR MattR is offline
Registered User
 
Join Date: Mar 2001
Location: Lexington, KY
Posts: 606
SELECT DISTINCT * INTO someothertable FROM yourTable

DROP yourTable

RENAME someothertable TO yourTable
__________________
Thanks,

Matt
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On