|
-
Jul 25th, 2008, 08:27 PM
#1
Thread Starter
PowerPoster
delete records
hello! How do I delete a duplicate records in sql? I have autonumber number primary key.
-
Jul 25th, 2008, 09:25 PM
#2
Thread Starter
PowerPoster
Re: delete records
this is what i have in my table
36918 EL20080752 CARIAGA ADRIAN PAUL R. MALE LC4 READING4 NULL St. Gemma
36930 EL20080752 CARIAGA ADRIAN PAUL R. MALE LC4 READING4 NULL St. Gemma
36931 EL20080753 CLAVEL ZYRIL JAY F. MALE LC4 READING4 NULL St. Gemma
36943 EL20080753 CLAVEL ZYRIL JAY F. MALE LC4 READING4 NULL St. Gemma
36944 EL20080754 DELA TORRE CHRISTIAN FELIX T. MALE LC4 READING4 NULL St. Gemma
36956 EL20080754 DELA TORRE CHRISTIAN FELIX T. MALE LC4 READING4 NULL St. Gemma
36957 EL20080755 DIAZON MARK JOSEPH M. MALE LC4 READING4 NULL St. Gemma
-
Jul 25th, 2008, 10:26 PM
#3
PowerPoster
Re: delete records
I'd say you have two options (assuming dups are in fact identical).
That is you could have a Dup where the name is slightly misspelled,
upper/lower case may also play a role.
==============================
1) Set up a Key for the fldName Address String.
2) Load in the first record and seek others similiar strings.
3) If found delete it (assume you want to keep the first occurance)
4) Continues looping through the DB (until .EOF), repeating
the next record, seek, etc.
=================
With SQL you may be able to do a Query and Group by the Name Addr field
but then you would have to manually delete dups.
Last edited by dw85745; Jul 25th, 2008 at 10:29 PM.
-
Jul 26th, 2008, 01:11 AM
#4
Thread Starter
PowerPoster
Re: delete records
how do i do it in sql management studio? I am using vb2005 and sql2005
-
Jul 30th, 2008, 09:07 AM
#5
Frenzied Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|