Remove Duplicates From Four Different Fields/columns

Jul 31, 2007

Hi everyone,

I am working on a database to manage newsletter subscriptions. Each subscriber record has the option of having up to four email addresses registered to his/her name.

Is there a way to check for duplicate email addresses in the entire database? It would have to compare all values in all four fields of all records.

Any ideas on how to implement such a thing? I'm clueless...

Thanks!

View Replies


ADVERTISEMENT

Queries :: Remove Duplicates - If 2 Fields Are Equal

Nov 19, 2013

I have a large table with many fields and many rows. There is no primary key. I'll call one field ParentPN, and another field ChildPN. There are many other fields as well. I want to identify all rows where BOTH the ParentPN and ChildPN occur more than once. I know how to create a query to identify duplicates of ONE field in the table, but not two. I can solve this with VBA: I will read the two fields of interest in the first row, then compare both values with every other row. If it finds another row with BOTH ParentPN and ChildPN identical with the first, that's a "hit". Then, repeat with all the other rows. I could find ways to make this run faster, but I was wondering if there are any build in functions to accomplish this. I looked at the Find Duplicates query builder, and all I see is I can select ONE field to search for dupes, not two.

View 14 Replies View Related

Combine Tables - Remove Duplicates And Add Fields

Sep 28, 2015

I have 4 or 5 tables. Most of the fields are exactly the name but they all have at least 1 to possibly 5 or six fields that are not in the other table. Additionally there are some duplicates within the individual tables as well as across tables.

i.e.

I have a

Student Table - with all the info on the student as well as a column called student that identifies them as such however it does not have the columns parent, donor, appeal, designation.....
Parent Table - with all the info on the student as well as a column called parent that identifies them as such however it does not have the columns student, donor, appeal, designation.....
Donor Table - with all the info on the student as well as a column called donor that identifies them as such however it does not have the columns student, parent, appeal, designation.....
Appeal Table - with all the info on the student as well as a column called appeal that identifies them as such however it does not have the columns student, parent, donor, designation.....

-A person can be within one of these tables more than once but with all the same information.
-A person can also fall into all of these parameters so they could be on every table with the same information in addition to the missing columns,=.

Question 1 : what is the best way to dedupe and delete the individual tables (they all have account numbers)
Question 2: I was thinking create a new table with all the columns available, however how do i dedupe across tables while populating the additional columns from each?

View 9 Replies View Related

What Is The Best Way To Remove Duplicates

Apr 12, 2007

I have a query linked to a main frame database. One of the fields is [significance] and gets a number 1-20. Usually when this data is entered, it gets multiple significance numbers. This causes my query to return separate records for each significance number. For example if case number 123 is given significance codes 1, 5 and 12, then my query returns 3 records.

I need a query that will show all records one time that have a significance code other than 12. This would be easy if there were not duplicate entries for the same case number because I could simply say "Not 12". So in the example above, my query returns 2 records showing significance codes 1 and 5. But I don't want to see the record for case number 123 because it also has a 12 significance code.

So what is the best way to handle this?

I appreciate the help.

Jim

View 1 Replies View Related

Remove Duplicates

Jun 14, 2007

If have a table with billing occurances and one of the fields is "business name" how would I need to setup a make table query which lists unique occurances within that data?

Essentially, I want to remove duplicates. If ABC Pet Store has 5 billing occurances and XYZ Pet Store has 1... I want both to only be listed once.

I hope that makes sense. Thanks for any help as to how to set this up!

View 1 Replies View Related

How To Remove DUPLICATES

Sep 3, 2004

I would like to remove duplicates from the following query. I would like it to display only one record depending on the InvoiceID. So only show one unique record based on Invoices.InvoiceID. Thanks!

SELECT DISTINCT Invoices.InvoiceID, Invoices.CustomerID, InvoiceDetails.InvoiceDetailID, Invoices.InvoiceDate
FROM InvoiceDetails INNER JOIN Invoices ON InvoiceDetails.InvoiceID = Invoices.InvoiceID
WHERE (((Invoices.InvoiceDate) Between #8/1/2004# And #8/31/2004#) AND ((InvoiceDetails.DeliverBy)=0))
ORDER BY Invoices.InvoiceID;

View 1 Replies View Related

Cannot Remove Duplicates Using Primary Key

Mar 27, 2006

Hi all, total newb here with a question i can't find answered anywhere. (you are my only hope) This database contains over 70k records and is a collection of user registrations over the years. Heres the issue.

After running the find duplicates query and get my list (over 8000 dupes) i get a sample like below. I cannot now run the append query as every other site or article says to. I can't set the primary key to surname because there are so many records that have the same last name but diff. first name. I need it to remove the dupes based on the EditDate, keeping the newest record.

List before dedupe:eek:
IDTag..................Surname......First......... ......EditDate
37659362.............Adams.........Mary........... ...2005.10.21
57506..................Adams.........Mary......... .....2005.04.25
37661858.............Adams.........Nichole........ ...2005.06.23
37661857.............Adams.........Nichole........ ...2005.06.23
37661795.............Adams.........Nichole........ ...2005.06.17
51176..................Adams.........Nichole...... .....2005.03.16
37657399.............Adams.........Rudo........... ...2006.02.15
54640..................Adams.........Rudo......... .....2005.02.08

List after dedupe:D
IDTag..................Surname......First......... ......EditDate
37659362.............Adams.........Mary........... ...2005.10.21
37661858.............Adams.........Nichole........ ...2005.06.23
37657399.............Adams.........Rudo........... ...2006.02.15

Any suggestions?

Newb

View 4 Replies View Related

Want To Remove Duplicates From A SQL Code

Dec 31, 2013

I have the below code but I want to add a grouping to it so that if there is a duplicate building number it will not list it. Is there a way to add a grouping into the code to do this?

SELECT Q_PI_Qrtly_Insp_Ct_Range.District, Q_PI_Qrtly_Insp_Ct_Range.Bldg_Number,
Q_PI_Qrtly_Insp_Ct_Range.Bldg_Name, Q_PI_Qrtly_Insp_Ct_Range.Address, Q_PI_Qrtly_Insp_Ct_Range.City,
Q_PI_Qrtly_Insp_Ct_Range.State, Q_PI_Qrtly_Insp_Ct_Range.FSL, Count(Q_PI_Qrtly_Insp_Ct_Range.Insp_Date) AS CountOfInsp_Date, Q_PI_Qrtly_Insp_Ct_Range.Due, Lookup_Tbl_Commander_Inspector.Commander

[code]...

View 1 Replies View Related

Remove Duplicates But Keep Uniqe Identifyer??

Jun 6, 2005

I have a table of 50,000 reccords. The table has 8 fields of theses eight fields I want to remove duplicates based on 4 of the fields in a query. Is there a way I can do this and keep the uniqe identifyer so that after the duplicates are removed from those 4 fields I can match them back up with the other four fields????

View 1 Replies View Related

Remove Duplicates From Query/form

Nov 10, 2005

Hi,

I have the following set up on a form to pull together a query (by form) and resulting report:

Publication
Sector
Product
Region

Each publication can have multiple sectors/products/regions. The resulting query therefore duplicates the publication, for example:

Publication 1 Sector 1 Product 1 Region 1
Publication 1 sector 2 product 1 region 1
publication 1 sector 2 product 2 region 1

etc etc...

The report ONLY has publication on it, but as it is based upon the query utilising the 4 factors above, the resulting report is:
Pub 1
Pub 1
Pub 1
Pub 2
etc

I want the report to only list the publications once - i have tried "hide duplicates" from the form field properties, however this hides the text but leaves a big gap on the resulting report when generated where the duplicate would be if it were not hidden.

There must be a simpler way to acheive this than getting another query to create a table based on the first query which (the table) only includes the publication name, and is filtered to remove duplicates through a primary key...

Can anyone help!?

cheers
amx

View 1 Replies View Related

Remove Duplicates With Conditional Criteria

Feb 27, 2014

I am trying to design a delete query that has an additional criteria needed.

I want to delete identical IDs in one column only if there are identical values in an adjacent column.

So for example, in the table below I want to delete the last row where the duplicate ID is "2700023" because the Code field has identical values, "LRAC". I do not want to delete the second row because the Code field is different for the row.

ID Code
2699974 BCC
2699974 SRAC

2700023 LRAC
2700023 LRAC

View 1 Replies View Related

Queries :: Remove Duplicates Entries In Table?

Jun 11, 2013

I have a table called Stock Levels which contains 3 fields. (ID, ProductID, StockLevel) ID is the Pkey, ProductID contains duplicates and StockLevel which contains different stock levels

and I am trying to remove the duplicates and retain the the data so I am left with the correct stock number

what I have done is the following, but I am still getting duplicate values in productid and stocklevels

SELECT DISTINCTROW id, productid, stocklevel into mynewtable from stocklevels

I have attached a screenshot of the table

View 3 Replies View Related

Update Related Records And Remove Duplicates

Mar 18, 2014

I have two tables, one is of departments, and one is of people (with a FK denoting what department this person is in). Now consider the fact that there are duplicates in the departments table, and I would like to remove these duplicates. However, the duplicates have related records (in the people table). So, before removing the duplicates, I must update the FKs in the table of people (this is the step I'm having trouble with).

Here's an example:

As you can see, the "Sales" department is there twice. And both have a related record. What I want to do is:
Update all DepartmentIDs (in tblPeople) to not point to duplicate records. In this example, that would be PersonID 2; Joe. His DepartmentID should update to "1" (as both "1" and "2" are "Sales").Delete the duplicates in tblDepartments (in this case, DepartmentID 2, "Sales").

The second step is no problem, it is only the first I am struggling with.

Also, the example posted here is just an example, the data I actually need to do this for is significantly more complex and there are many more records! In the attached database:

qry1: Simple query to find all duplicates (just used the query wizard)
qry2: Just the first row of each duplicated departments (duplicates that shouldn't be deleted). In the example above, this would be the "2", "Sales" row in the tblDepartments table.
qry3: Basically all qry1 rows that don't appear in qry2
qry4: All qry3 values, and their respective qry2 value.

This is what each of the (soon to be deleted) duplicate values' related records' DepartmentID should be updated to... There's no simpler way to phrase that, so using the example above, qry4 would return "2","1". This indicates that all people with a DepartmentID of "2" should be changed to "1" (so we can subsequently erase the department with the ID of 2.

This is as far as I have gotten. My next step is: Update all FKs in tblPeople based on qry4 (You can't set an update query's criteria to pull from another query, nor can you use the second query for the update value... or maybe you can, but I don't know about it).

View 3 Replies View Related

Queries :: Find Duplicates From 2 Tables And Remove From 1 Table

Jun 29, 2014

I have a report with 2 access tables (1 Master table and another a daily feed table)

The Master table keeps a log of all incoming records. (once append it to this table, should not show in future reporting)

The Daily feed information within the last 48 hours. (uploaded from an excel report into access temporary table)

When the daily feed table gets completed, I append the records and updated them into the Master to avoid duplication.

When I upload the daily feed table and I match it against the Master table to find duplicates, how can I delete the duplicates from the Daily Feed table?

This is my code to find duplicates:

SELECT CMPreport.ID, CMPreport.MbrName, tblMaster.ID
FROM CMPreport LEFT JOIN tblMaster ON CMPreport.ID = tblMaster.ID
WHERE (((tblMaster.ID) Is Not Null));

View 9 Replies View Related

Modules & VBA :: Create A Simple Report But Remove Duplicates

Nov 4, 2013

I have a simple spreadsheet:

Ref# Rev
97 b
98 c
99 c
99 e
100 c
100 b
101 a
102 b

I need to create a simple report but remove the duplicates (ex. Ref# 99,100). I need to delete the older Rev's (Ex Ref# 99 Rev C, Ref# 100 Rev B).Is this done throughRecordsets? will an SQL query do the trick?

View 7 Replies View Related

Queries :: How To Remove Duplicates On Reference Number Field

Aug 28, 2013

I have a query which gets information from 2x tables where the I'd on one table is the reference number on the second table.I would like to know how I can remove the duplicates on my reference number field?

View 3 Replies View Related

Modules & VBA :: Normalize Data In Array / Remove Duplicates And Import

Dec 18, 2013

I have some data in an array that I need to normalize, remove duplicates, and import.

Original Table

Every record in the array has a person, all but a few have an address, most have a phone, and some have an email.

Person----- Address ----- Phone ----- Email
Tom ----- 10 A Ln ----- 789... ----- e@a
Sue ----- 20 B Ln ----- 256... ----- _____
Sam ----- 30 C Ln ----- _____ ----- _____
Dan ----- 40 D Ln ----- 478... ----- _____
Jan ----- 40 D Ln ----- 567... ----- e@d
Stu ----- 50 E Ln ----- _____ ----- _____
Syd ----- ______ ------ 224... ----- _____

New Data Structure

I want to group the data by HouseHold; which Address will serve to define for this import.

tblHouseHold
hhID
tblAddress
adrID, hhID, Address
tblPerson
prsID, hhID, Person
tblPhone
phnID, hhID, Phone
tblEmail
emlID, hhID, Email

I've been working on a procedure to step through the recordset and add the data one record at a time so I can get rid of the duplicates.

I've tried a few approaches, but this is where I'm at now.

Code:

Dim rs As DAO.Recordset
Dim rsHH As DAO.Recordset
Dim rsPhone As DAO.Recordset
Dim rsEmail As DAO.Recordset
Dim rsAddress As DAO.Recordset
Dim rsPerson As DAO.Recordset
Dim db As DAO.Database
Set db = CurrentDb

[Code] .....

View 2 Replies View Related

Possible To Remove Duplicates From A Query Based On Values In Single Column?

May 14, 2015

I have a query that displays this

Column1 Column 2 Column 3 Column 4
TripTitleA TravelerA N/A N/A
TripTItleB TravelerB N/A N/A
TripTitleC TravelerC TravelerD TravelerE
TripTitleC TravelerD TravelerC TravelerE
TripTItleC TravelerE TravelerC TravelerD
TripTitleD TravelerF N/A N/A

I want to filter Column1 to have no duplicates so it looks like this

Column1 Column 2 Column 3 Column 4
TripTitleA TravelerA N/A N/A
TripTItleB TravelerB N/A N/A
TripTitleC TravelerC TravelerD TravelerE
TripTitleD TravelerF N/A N/A

Is this possible?

View 1 Replies View Related

Queries :: Importing Spreadsheet On Daily Basis - Detect / Remove Blank Columns

Sep 18, 2013

I am importing a spreadsheet on a daily basis that has the same columns in every time but depending on the company I am importing it for different columns will be blank and not needed each time.

What is the best way of detecting and removing blank columns.

View 3 Replies View Related

Allow ONLY Duplicates In Two Fields

Apr 17, 2013

I have created a database which holds architectural drawings for my company. The drawings have a number (dwgNumber), a name (dwgTitle) and a revision (dwgRevision). Each number should only have one title but cannot be unique as they can have several revisions. I am looking for a way to allow the users of the database to only enter a drawing title for a drawing number once. This is because if more than one person is accessing the front end at a time, they may use the same drawing number for different drawings.

For Example:

----THIS IS FINE

Number: A001 Title: Drawing 1 Revision: P1
Number: A001 Title: Drawing 1 Revision: P2

----THIS IS NOT OK

Number: A001 Title: Drawing 1 Revision: P1
Number: A001 Title: Drawing 2 Revision: C1

Basically, each number can only have one title assigned to it.

View 1 Replies View Related

Stoping Duplicates Over 3 Fields

Oct 15, 2004

Is there any way I can stop the same permutation of three field values being duplicated in a table.
eg
a - b - c is ok
a - b - d is ok
b - c - e is ok
a - e - c is ok
a - b - c ......duplicate

View 2 Replies View Related

Tables :: Allow ONLY Duplicates In Two Fields

Apr 17, 2013

I have created a database which holds architectural drawings for my company. The drawings have a number (dwgNumber), a name (dwgTitle) and a revision (dwgRevision). Each number should only have one title but cannot be unique as they can have several revisions. I am looking for a way to allow the users of the database to only enter a drawing title for a drawing number once. This is because if more than one person is accessing the front end at a time, they may use the same drawing number for different drawings.

For Example:

----THIS IS FINE
Number: A001 Title: Drawing 1 Revision: P1
Number: A001 Title: Drawing 1 Revision: P2

----THIS IS NOT OK
Number: A001 Title: Drawing 1 Revision: P1
Number: A001 Title: Drawing 2 Revision: C1

Basically, each number can only have one title assigned to it.

View 8 Replies View Related

Remove Data From Fields

Feb 14, 2008

Hi, I am new to access. My father likes to gamble and has lists of horses he likes to check to see if they are running. He is currently using Microsoft Word and has to check each one by one. I thought if I could get the lists in to Access then it would be a lot easier. I have a field called 'Name' where I am going to put in the horses. The problem is many of the horses in his list have the country next to their name in brackets. I want to remove the brackets and their contents automatically. So if I enter 'horse (GBR)' then I want only 'horse' to be entered. How would I go about doing this. I have brackets in other fields so want this limited to the 'Name' field only. Is this possible?

Thanks :)

View 12 Replies View Related

Finding Duplicates Out Of Differents Fields

May 16, 2005

Sorry for the question's wording.

Here is what bugs me:

- I have one table tblRefctc with the followings fields :
LCtcRef,../..,LRefServ0, LrefServ1,..LrefServ16.

Where all those Lref are long; LCtcRef being the primary key. This table describe a contact from different branches (account, etc..) so while each branch has the relevant information about this contact, they know that that branch too is in contact with the same person.

- I have this other table with describes Events, TblIdxEvt (meeting, whatever) :

LRefidx,IdxEvt,IdxCtc

where IdxCtc is filled with LCtcRef once an event is created.

What I must check for is : For the same IdxEvt, should another branch makes an appointement for LCtcRef (i), I must check if one of the LRefServ0 to LRefServ16 are not already added in the event table.

At this time, I am stuck with making functions which test the existence of the LRefServ(i) (i ranging from 0 to 16) in tblIdxEvt, but I wonder if there is a simpler way to do it with SQL (which, as you could guess, Im not good at).

Thanks in advance for any pointers.

View 2 Replies View Related

Combine Fields From One Table Without Duplicates

Jan 30, 2008

Hello,

In access 2003 i have an external Oracle table named EXT-COM_EXTRA_DATA_FIELDS
in this table I have the following fields: COM_DATA_KEY, COM_DATA_FIELD_NO, COM_DATA_VALUE

From this I have created a query named: LOOKUP-BARCODES-10 this looks at the above table by filtering the
the records on the field: COM_DATA_FIELD_NO where this =10.

Also I have created a second query named: LOOKUP-BARCODES-20 this looks at the above table by filtering the records on the
field: COM_DATA_FIELD_NO where this =20

Below is sample data in the table:

COM_DATA_KEY; COM_DATA_FIELD_NO; COM_DATA_VALUE
009A/s 10 03010303165001
009A/s 20 04350309115002
010B/P 10 05150909116001
010B/P 20 06150909116002
011C/X 10 07281809217003
011C/X 20 N/A


The problem is i would like to combine the numbers in the COM_DATA_VALUE field for the same product (ie the same COM_DATA_KEY
record) on the same rows without any duplicate records as shown below:

COM_DATA_KEY; COM_DATA_VALUE; COM_DATA_VALUE (2)
009A/s 03010303165001 04350309115002
010B/P 05150909116001 06150909116002
011C/X 07281809217003 N/A

As you can see from above some records only have data in one COM_DATA_VALUE (like 011C/x) where COM_DATA_FIELD_NO = 10 but no
data for the same product where the COM_DATA_VALUE = 20.

Im thinking maybe i can create a new join query that looks at the above two query’s and combines the values in the COM_DATA_VALUE for
the same product onto the same record row but im not sure how to go about this without creating duplicates & its been some time since ive done joined queries. Any help would be great?

ive attached a cut down version of the database with the table imported from oracle rather than being linked to oracle if this helps.

Thanks

Kevin

View 2 Replies View Related

Remove Dups Based On 2 Or More Fields

Oct 2, 2007

Greetings to all,I have duplicate records in my table (i.e. there are two or more records that are identical, and I only want to keep one of them). Is there another way to delete the duplicate records other than one at a time? Assigning primary keys and appending only unique records to a new table is not an option because in some instances, I want to maintain duplicate values within a field (i.e. the desire to delete is based on more than one field)Any help would be greatly appreciatedCheers, Lori (An Access amateur)

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved