2 Tables - VIEW Duplicate Records

Feb 3, 2005

I have 2 tables that have the same structure and same column names - Table A and TAble B. If field1, field2, field3, field4, and field5 match - I want to see that duplicates exist.

How do I do it with 2 tables? I know the query wizard check for duplicates can do it in one table - but I need to compare the two.

thanks.

View Replies


ADVERTISEMENT

Tables :: Deleting Duplicate Records

Sep 11, 2013

i have a data base with a primary key but some records have been added from a excel data base and now the data base has duplicate records with different primary keys. I do a Query looking for duplicate records based on a field not the the primary key. There are 315 out of 22000. I can sort the table and then manually delete the dups. The Query does not allow deleting records so finding the culprits in the full Data base is time consuming. How can i delete the duplicate records using a query? Is this function available hidden someplace in the guts of Access? Seems like this would be a frequent problem. The Microsoft forum addresses this problem and the only viable solution is the manual method, when they get to the Query method it looks like they just forgot what the subject was and tell you how to delete one record if you know what the criteria is. If two non Key fields are Identical then i want to delete one of the records.

View 3 Replies View Related

Cannot Allow Duplicate Records In 2 Tables Based On 2 Criteria

Sep 26, 2005

Dear all,

I would like to seek your help on this problem.

I would like to do a search for my records based on 2 different criterias. If found, the function should just return a boolean value so that I can act further based on the boolean value.

The reason I'm doing this is that I have 2 similar tables that contains EventID and AttendeeID and these 2 tables cannot have the same EventID and AttendeeID. So before I can allow a record to be inserted in the 1st table, it must check that there is no record in the 2nd table that has the same EventID and AttendeID. If there is, then i cannot allow the record to be inserted in the 1st table.

The same thing applies when I want to insert a record in the 2nd table. It must now check the first table.

Recordset.find seems to be only catering to 1 criteria, not 2.

Pls help. Codes are most welcome too.

View 3 Replies View Related

Tables :: Removing Duplicate Records From One Table

Feb 18, 2014

I have a table with at least 13.000.000 records. There are many duplicates records... For example

ID Name Family mobile car number chassis Register_Year
1 Roy Jalbout 9999 123456/G ASF4546 2005
2 Roy Jalbout 9999 854658/G GRK554JFJD 2009
3 Tony Elishah 1234 854658/G GRK554JFJD 2012
4 Sam Markos 5478 854658/G GRK554JFJD 2014
5 Roy Jalbout 9999 123456/G ASF4546 2005

As you can see ID Number 2,3,4 have the same car but every one bought from another so it's not duplicates

The duplicates here is the ID's number 1,5. So how to remove the duplicates. I remember you i have at least 13.000.000 records. I try to make a query to find duplicates then i make a copy of the original table and than i should make a primary key then append the data from the original table to the copy table, but here i have more than one criteria

When I made a query to find duplicates the result was 680.000 records and every one have a minimum 2 duplicates an maximum 4 duplicates so it's about 2.500.000 duplicates records at least....

View 5 Replies View Related

Tables :: Detect / Delete Duplicate Records In A Table

Apr 22, 2014

I'm wondering if it's possible to create a Query / Macro / VBA or whatever works, to detect the duplicate records in a table and delete them with the push of a command button. Or, even to do this automatically when the database opens using an AutoExec macro or something ?. I'd like for one copy of each record to be left intact in the table.

View 8 Replies View Related

Tables :: Unique Identifier - Increment For Duplicate Records

Jul 10, 2014

I'm currently in the process of doing a an overhaul of the database including a table, some odd 17,500 records long.

What I need to do is to create a unique identifier from the existing part number, almost like an autonumber, but it only increments when there are duplicates. What I mean is that there would be for example, there would be five records of say, part 000135.

What I'm trying to get at is, how I would have to code to grab the existing part numbers (all formatted to be 6 digits), add an extra 2 digits to be its unique identifier, and then save it all to a Unique Identifier column, that I created.

An example of what I want is say, I have part numbers 000135 and 000136. The numbers would go up from 000135-01, 000135-02, 000135-03, 000136-01, 000136-02.... The dash is not as important as implementing the 2 digit unique identifier.

View 5 Replies View Related

Tables :: Unique Multicolumn - Avoid Duplicate Records

May 28, 2014

I have 3 tables

tbl1 :
NameID
Name

tbl2 :
CatID
Category

tbl3 :
ProdID
CatID
NameID
Remarks

How can I avoid duplicate records in tbl3? Since remarks can be Null? product is later used in tblInventory...

View 1 Replies View Related

Tables :: How To Keep Data From Importing Duplicate Records Based On One Field

Sep 11, 2012

I'm able to import new data from excel just fine, but I can't import updated data from excel due to duplicates not being allowed for a particular field. Is there a way to keep from importing duplicate records based on one field, but still import data from other fields where the information is different from the excel file?

View 5 Replies View Related

Tables :: Merge Duplicate / Similar Records Into 1 Record In Access 2010

Jun 9, 2014

Is there a way to merge duplicate/similar Access 2010 records into one record?

I have an Access table with 1,000 duplicate records, although they are similar and not exact duplicates. As you can see below, some records contain information that other records do not. Yet, the primary key is the same for all duplicate records. I want to find a way to merge data from filled cells of duplicate records into empty cells for each duplicate record. I do not want to concatenate the data (i.e. combine last and first name, etc.). I only want to fill empty cells if there is a match for it in a duplicate record. I will delete the newly exact duplicate records later. Short of correcting the records by hand.

Example

Code:
LastName FirstName SSN Address Phone Email
Doe John 123-45-7891 123 Anywhere St. NULL john(at)gmail.com
Doe John 123-45-7891 NULL (123)456-7890 NULL

Desired Result

Code:
LastName FirstName SSN Address Phone Email
Doe John 123-45-7891 123 Anywhere St. (123)456-7890 john(at)gmail.com
Doe John 123-45-7891 123 Anywhere St. (123)456-7890 john(at)gmail.com

View 2 Replies View Related

Forms :: No Filters - Cannot View All Records In Form View

Aug 27, 2013

I have 4 tables and around 440 records but can only view up to 417 in the form I have designed. I have been adding new records via form and it has been added to my main table, but when i try to view it in form view - the record is not available to view. What do I need to do to correct this problem?

I have checked that there are no filters, data entry is set to No, Auto deletions, additions and edits are set to yes.

Also to mention it seems that the problem has arisen since I set up some new queries, there is a one to one relationship between the tables!

View 1 Replies View Related

View Records In Form View

Apr 6, 2006

Hi, I am in the process of creating a new database - I am a bit new to this. I have a main form, which also contains two subforms. The record source of the main part of the form is 11 tables, and then each of the subforms is based on one table each (so there are 13 tables altogether).

Everything seems to be linked up ok, and when I add new information to the form (and the subforms), the information gets saved to the tables as it should be. However, I want to be able to view past records in the form view, so that users can regularly update past records using form view. I can't do this. Each time I open the form view, the thing at the botton left says 'record one of one.' THen if I put the curser in (for eg) the box called 'client name' and click on the search button, I get a message saying:

"you can't find or replace now, the fields are not searchable due to:
- the fields are controls;
- the fields have no data;
- there are no fields to search."

well I don't really know what that means. There is definately data in there somewhere, because I can view it in the table view, but I'd like to be able to view and update old records, and search, in the form view.

any tips?

thanks for helping

View 4 Replies View Related

Queries :: Mass Duplicate Main Records And Related Subform Records

May 29, 2014

In my simple database (attached), I need to mass duplicate Tasks and their Notes.

I have three tables: tbTasks (PK: Task_ID), tbNotes (PK: Note_ID), jtbTaskNotes (FKs: Task_ID and Note_ID). jtbTaskNotes is my many-to-many junction table that ties Tasks to Notes.

The main form (fmTasks), bound to tbTasks, has a subform (sbfm_TaskNotes) that displays notes associated with each Task. On themain form,you select which Tasks you want duplicated via a checkbox. The append query (quCopyTasks) will duplicate all tasks that have the checkbox checked. All good there. However, I can't figure out how to also duplicate each task's Notes.

I found Allen Browne's solution [URL] ....., but that only handles duplication of one record at a time, whereas I need to duplicate many records at a time (sometimes 10+ records). How do I go about duplicating multiple Tasks and their associated Notes?

Before you ask "why are you duplicating records?": There are times when tasks need to be re-accomplished and therefore need to have a new record. It's easier to duplicate records than it is to hand-jam everything again.

View 5 Replies View Related

Qry Results Show Duplicate Records, Records Are Not Dup In Table.

Nov 16, 2004

I have built a qry that initially shows the correct information. For example.

tblContent has 289 records with a Type = Class.

I built a Query to select from tblContent Type = Class and I get 289 records. I add additional criteria of Progress <>"Not Scheduled", I then get 206 records. I then add additional criteria Last Name <>"Demo" And <>"Care" And <>"Support". This brings up 200 records, but the query appears to duplicate each record 3 times. I do not have 3 of the same types of records.

The SQL Statement is below

SELECT tblProfile.LoginName, tblProfile.FirstName, tblProfile.LastName, tblProfile.Organization, tblProfile.CostCenter, tblContent.Title, tblContent.Type, tblContent.Code, tblContent.[Date Assigned], tblContent.[Date Started], tblContent.[Last Accessed], tblContent.Progress, tblContent.[Date Completed]
FROM tblProfile INNER JOIN tblContent ON tblProfile.LoginName = tblContent.LoginName
WHERE (((tblProfile.LastName)<>"Demo" And (tblProfile.LastName)<>"Care" And (tblProfile.LastName)<>"Support") AND ((tblContent.Type)="Class") AND ((tblContent.Progress)<>"Not Scheduled"));

The qry is named qryPhysical Class. I have provided the link to view the database. Can you help me?

http://briefcase.yahoo.com/turnerbkgabrobins

Thank you in advance for your assistance.

View 1 Replies View Related

Delete Duplicate Records Or Blank Records

Mar 19, 2007

I want to find duplicate records based on FirstName and LastName and delete the duplicate. Also, I want to delete any records which have a blank FirstName and LastName.

How can I do this?

Thanks,

Dave

View 3 Replies View Related

Tables :: Lock View Of Tables And Queries?

Sep 24, 2013

I want to lock the view of certain tables and queries so that users could not perform any change at their own. Is there any way in VB to protect it with password....

View 1 Replies View Related

Duplicate Records

Jul 5, 2005

pls can someone point me in the right direction

have searched through the forums.

i have two fields Forename & surename i need to prevent duplicate records if the forename and surename match another record.

View 2 Replies View Related

Duplicate Records

Oct 24, 2006

Hi

I have a table (which is populated by people filling in a form) which contains two fields:

Section
WeekCom (e.g. week commencing)

I want to make sure that the form will not allow someone to make a double entry. For example, if Sally goes in and says enters "Benefits" as the section and "WeekCom" as 15/10/06, and then Ben tries to do the same - the form will not allow Ben to enter it.

How do you do this please? The table does not have a primary key at the moment....is there any way of doing it without setting one of the fields as a primary key?

Thanks

Maria

View 5 Replies View Related

Duplicate Records

Apr 9, 2007

I Need to run a query that will not show duplicate records.

For example if joe smith is listed five times i only want the most recent date of membership.

Does anyone have any ideas?

View 1 Replies View Related

Duplicate Records!

Apr 30, 2006

I have a form in Access which has event date and then also an event time slot such as "Morning, Afternoon, Evening" . I need to make it so that you cannot have a duplicate time booking, i assume i will need to code some VBA but if anyone could tell me what it would be much appreciated. Thanks

View 2 Replies View Related

Duplicate Records

Feb 7, 2008

i m new user to access i just wanna know how can i count duplicate recodes for example how many time
record repeat in one column


waiting for ur quick reply thanks

View 1 Replies View Related

Tables :: How To View Linked Tables

Oct 29, 2013

I am taking over a database someone else created but is no longer here. The tables are linked to an external oracle database. I know the links exist because when I run a query it prompts me for my user name and password. However, the tables look like regular tables. There is no icon showing it's a linked table so I don't know which tables are actually linked and pulling from the Oracle database.

View 6 Replies View Related

How To Delete Duplicate Records

Apr 30, 2007

Hello,

I have a table that has many duplicate records. I tried importing the table and setting the field to no duplicates but did not work. How can I delete duplicate records. The primary Id id fine I have another field that I can use. it is a BAC number that is repeated many times. Here is the table I need fixed.

Thanks

View 1 Replies View Related

Random Duplicate Records

Feb 20, 2006

Hi Guys,

I hope someone can help with this. I have a table, "Blasthole Submission" which is populated by input in a form, using the code below:


Const MyTable As String = "Blasthole Submission"
Const MyField As String = "Sample Name"
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim intCounter As Double
Set db = CurrentDb
Set rs = db.OpenRecordset(MyTable)
For intCounter = Me.txtStartValue To Me.txtEndValue
rs.AddNew
rs.Fields(MyField) = "TP" & intCounter
rs.Fields("Submission #") = Me.SubNum
rs.Fields("Sample Type") = "Blasthole"
rs.Fields("XRF") = "True"
rs.Fields("LOI") = "True"
rs.Update
Next intCounter
rs.Close
db.Close
Set rs = Nothing
Set db = Nothing


What I am hoping to do is to place a random duplicate in the table, called, for example TP111152 DUP, approximately every 50th record. Is there any easy way of doing this?

Thanks in advance for your help!

View 11 Replies View Related

How To Prevent Duplicate Records?

Jan 13, 2007

i am using a textbox in the main form to transfer the Yr/Mth into the table. (refer to qp.zip)

now my problem is, how do i prevent duplicate records into the table?

e.g: currently whenever i scroll ard the months control in the form, i will get duplicate Mth/Yr into the table. how do i prevent that from happening?

i only want to have updated data inside the Mth/Yr table instead of duplicated Mth/Yr

Public Sub PutInMonthlyRecords()

Dim sql As String
Dim Db As DAO.Database
Dim rs As DAO.Recordset
Dim f As Form
Dim MthYr As String

Set f = Forms!frmQpi

MthYr = f("txtMthYr")

sql = "SELECT * FROM [tblQpiMonthly] WHERE (([tblQpiMonthly].[Input MthYr] = 'MthYr' ));"

Set Db = CurrentDb()
Set rs = Db.OpenRecordset(sql)


If rs.RecordCount = 0 Then
If (f!txtTotalPF) = 0 Then
Exit Sub
End If

rs.AddNew
rs![Input MthYr] = f("txtMthYr")
rs![Monthly TotalPF] = f("txtTotalPF")
rs![Monthly Rejection] = f("txtTotalAvoid")
rs![Monthly TotalAvoid] = f("txtRejection")

rs.Update

Else
If (f!txtTotalPF) = 0 Then
rs.Delete

Exit Sub
End If


rs.Delete
rs.AddNew
rs![Input MthYr] = f("txtMthYr")
rs![Monthly TotalPF] = f("txtTotalPF")
rs![Monthly Rejection] = f("txtTotalAvoid")
rs![Monthly TotalAvoid] = f("txtRejection")

rs.Update

End If


Db.Close

End Sub

View 1 Replies View Related

Identifying Duplicate Records

Jun 26, 2005

Be advised that I'm a complete novice with Access, and have used it only to view Excel files with more than 64,000 records. Any help would be appreciated.

I have an Excel file of 10,000 records entered by salesmen of possible prospects, with salesmen, prospect name, address fields. Some salespeople have entered the same prospect and address information; the only thing different in these records are the salesman name.

I know how to import the file into Access. But from this point, how do I construct a query and generate a report that shows me ONLY THE DUPLICATE RECORDS? We would like to use this report to identify the double entries and the salespeople so they can clean up the database. I know Access (I have Access 2003) can create this query, I don't have a clue on how to do it.

One hint: A post on another forum suggested " Make a group-by query (grouped on all fields except salesperson). Add a count field. Select if count >1. This should do the trick."

I'm sure this is the answer, but I don't know how to "make a group-by query", how to "add a field", etc. Like I said, I know how to import the data. That's it.

This is extremely frustrating to be this close to the answer and not know how to finish it. Any assistance would be appreciated. Thank you.

View 2 Replies View Related

Count Duplicate Records

Mar 27, 2006

I have an order database using Access 2000, I need a report to list all agents that have ordered in the past year, how many times they ordered and sort by Office city.

I have
SELECT tblCustomers.Type, tblAgentList.AgentID, tblAgentList.LastName, tblAgentList.FirstName, tblAgentList.Agency, tblAgentList.AgencyCity, tblAgentList.DeliveryAddress, tblAgentList.DeliveryCity, tblAgentList.DeliveryState, tblAgentList.DeliveryPostalCode, tblAgentList.[AgentOffice#], tblCustomers.InspectionDate
FROM tblAgentList INNER JOIN tblCustomers ON tblAgentList.AgentID = tblCustomers.AgentID
GROUP BY tblCustomers.Type, tblAgentList.AgentID, tblAgentList.LastName, tblAgentList.FirstName, tblAgentList.Agency, tblAgentList.AgencyCity, tblAgentList.DeliveryAddress, tblAgentList.DeliveryCity, tblAgentList.DeliveryState, tblAgentList.DeliveryPostalCode, tblAgentList.[AgentOffice#], tblCustomers.InspectionDate, tblCustomers.[Job#]
HAVING (((tblCustomers.Type)="P") AND ((tblCustomers.InspectionDate)>[Enter starting Date:]))
ORDER BY tblAgentList.AgentID, tblAgentList.AgencyCity, tblAgentList.AgentID;

It list all agents sorting by AgentID, with a line for each order.
I would like to list each agent once with the number of times ordered, and then sort by AgentCity. Any help would be appreciated... Thanks in advance!:D

View 3 Replies View Related







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