Is There Any Way To Make A Primary Key Contain Duplicates??

Mar 3, 2006

hi,

is there any way to make a primary Key contain duplicates??

any ideas ??

Many thanks

View Replies


ADVERTISEMENT

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

Queries :: Deleting Duplicates Without Primary Key?

Nov 4, 2013

I bounced into a big problem with Access 2010 where I cannot seem to be able to remove duplicates from a table containing millions of entries midway through a series of queries.

The table is formed like this:

Date - Serial Number - Reading 1 - Reading 2 - Reading 3
30.7.2013 - 1122334455 - 12345 - 987654 - 654321
30.7.2013 - 1122334466 - 12345 - 987654 - 654321
29.7.2013 - 1122334455 - 12210 - 987654 - 643210
29.7.2013 - 1122334455 - 12210 - 987654 - 643210
29.7.2013 - 1122334466 - 12344 - 986013 - 453213

As you can see, there are some rows which contain exact duplicates and some are a bit different. I wish to remove those fields with exact duplicates and only the duplicated fields. Running "Find duplicates" in Access gives me about 250,000 rows with such data.

I've tried a few options already:
- I cannot use the date as primary key as there are several serial numbers. I cannot use serial numbers as primary key, because there are several dates. Using reading value as primary isn't an option either.
- Microsoft says I should mark all duplicate values with an x and then make a delete query to get rid of all the x-marked rows. For 250,000 duplicates, that's a bit too much manual 'x-ing'.
- If I do a delete query using the Find Duplicates query as a base, it removes all 250,000 entries from that table, instead of just the 125,000 which had a duplicate elsewhere in the table.
- If I make a query which identifies duplicate data and gives me just one row for each duplicate, the delete query still deletes both entries from the original table.
- I could make a new query which would have only unique values using Totals as criteria (for instance, using First for the Date-column). However, this still leaves the duplicate values in the original table. Note that this database is already 800 MB large and new data is imported once a week, for the next decade or so. I cannot have a table get duplicates every week and leave it there.
- If I make a macro which would create the unique values table first and then deletes the old table, what happens next week when I try to import new readings? I would need to make a new macro each time I try to import new data as the table names change. Or is there a way to first run the unique numbers out, then replace the original table with the new one? With a 800MB database, this would put me dangerously close to the 2GB size limit. I wouldn't be able to use this as a part of a macro, as the database would have to do Compact & Repair each time it deletes the original table, midway through a longer series of queries.
- Having duplicates removed from the original import isn't an option either, as it comes in as a overriding excel sheet for the past 3 months, once a week.

As you can see, it's quite a pickle getting the duplicates out of the original table. This is just a small part of a very long macro, which takes about 15 minutes to complete, but due to duplicates the database is getting way too large.

View 9 Replies View Related

Make Table For Duplicates Only

Jan 11, 2005

How do I make a table from another that will only display the duplicate records in a field .... I have add'l fields in addition to the partno but not relevant.

i.e. partno new table will show:
0001 0001
0002 0001
0001 0003
0003 0003
0003

Thanks for your help....

View 2 Replies View Related

Make Calculated Field In A Table To Not Allow Duplicates?

Aug 15, 2013

Is it possible to make a calculated field in a table not allow duplicates?

There is obviously no option to select No Duplicates in the field settings?

View 2 Replies View Related

Make Table Query With Primary Key

Mar 24, 2008

Hi,

Anyone has the idea of creating primary key in a table using make table query?

Thanks.:confused:

View 1 Replies View Related

Make Table Query With Auto Primary Key Help

Jan 24, 2007

Anyone...
Please can you tell me how I run a make table query that makes one of the fields a primary key. Can it be done in the query or do I have to set it as part of a macro that runs the query. If so How do I achieve this.

I am running a make table query from a link table so i can use it with infopath. I run the make table query every time I update the spreadsheet that the link table runs off and it makes a proper table with it for infopath to run off (because I can't get infopath to run off a link table, No primary key means it won't submit.) When I run the macro that runs the query and creates the table, I need it to make oone of the fields a primary key.

Any suggestions

View 3 Replies View Related

Make Table Query Setting A Primary Key

Feb 26, 2007

I am trying to create a new Table using a MakeTable Query

using the following sql:

Code:SELECT qCPPlannedStopsOnTargetTotals.WeekNumber, qCPPlannedStopsOnTargetTotals.Line, qCPPlannedStopsOnTargetTotals.Description AS Above, qCPPlannedStopsOnTargetTotals.[%] INTO mkCPPlannedStopsAboveFROM qCPPlannedStopsOnTargetTotalsWHERE (((qCPPlannedStopsOnTargetTotals.Description)="Above"))ORDER BY qCPPlannedStopsOnTargetTotals.WeekNumber DESC;

However i want the new table to have a Primary Key, (Week Number) can i set this as the table is made?

Please help

Andy

View 1 Replies View Related

Queries :: Maintain Primary Key In Make Table?

Apr 9, 2013

Is there a way of keeping/setting the primary key when using a make table query?

View 2 Replies View Related

General :: How To Combine 2 Tables With Same Primary Key To Make One Table

Oct 18, 2012

How to I combine 2 tables with the same primary key to make one table? I have seen several thigns but none have worked. I seen inner and outer joins. All 4 of my tables have the same primary key. I just want to combine all the tables to make one table. I have a form with subforms but if I can combine all the tables and work off one rather then 4 I will be happier. Every week to 2 weeks I upload new data from excel. How would I after I add the new data combine all tables to one super table?

View 7 Replies View Related

Queries :: Make Table Query That Adds A Primary Key

Aug 8, 2013

I have a make table query that gets its info from another table that is updated weekly. I would like that when we run the Query Type (Make Table), we would like to add a primary key to a field that exists already starting at 1 every time the query is run.

View 3 Replies View Related

Find Duplicates And Create Table With Dates Of Duplicates

Feb 12, 2008

Hi this is my first post... so hi all :)

ok what i have is a table with contact details 900k plus

there are about 90k of which are duplicates.

this is the basic feilds that are important in this case.

Id, data_source, data_recived, data_code,

what i want is to have a table with unique records (no dups in data_code)

this table will look like this...

Id, data_code, Num_dups, dup1_source, dup1_date, daysbtw_Dup1_dup2, dup2_source, dup2_date, daysbtw_Dup2_dup3 ,dup3_source, dup3_date, daysbtw_Dup3_dup4 ,dup4_source, dup4_date,

I know there is no more than 4 dups of each record.

what i want from this is a table that will give me a record of how many dups for each record then all the dates that they were added and the date between each record entry.

if anyone can help it would be great .

thanks in advance.

View 6 Replies View Related

Find Duplicates Different Than Duplicates Deleted

Dec 8, 2005

Hey, all! Thanks for helping, here is my situation.

I have a table with about 70,000 records that have duplicate Address field values. The rest of the field values for those records are different. When I do a find duplicate querry I get the result that 17,000 records have the same address. However, when I do the append qurrey as instructed here: http://support.microsoft.com/?kbid=209183 I get a total of only 600 records in the new table. I have tried deleting all of the indexes for both the new and old table, with no luck.

I'm using Access 2000 on XP Pro.

If anyone could help with this I would greatly appreciate it!

Thanks

Will

View 14 Replies View Related

Changing From Duplicates OK To No Duplicates

Nov 1, 2014

I have an Access table with an indexed key that is currently set to duplicates OK. There are not supposed to be any duplicates in that field. But it is possible than a small number have crept through.

Two questions:

1. What would happen to those duplicate records if I changed the setting from duplicates OK to no duplicates?

2. Is there any way to ferret out those duplicate records first and change them manually? The table currently has 48000 records so it would be a pain to go through them page by page. (I know how to export them to Excel, where the dups can easily be found; I was just wondering if something could do it within Access.)

View 2 Replies View Related

Primary Key No Longer Primary Key!

Sep 15, 2006

I have created a very simple Access database with a CompaniesTbl, ContactsTbl and CallsTbl. The database is used to record telesales contact with customers. The tables are set up like this:

The CompaniesTbl has an AutoNumber Primary Key field called CompanyID.

The ContactsTbl has an AutoNumber Primary Key field called ContactID and a foreign key called CompanyID.

The CallsTbl has an AutoNumber Primary Key field called CallID and foreign key called ContactID.

The relationships are set up in the relationships window and referential integrity imposed.

Twice now, while editing a contact record, an error has occured. Task Manager has had to be used to get out of it. The error is either a 'run-time error with a message that does not mean anything' or it says 'unrecognized database format' (!?).

If you open the database again the ContactID field in the Contacts Table is no longer a Primary Key field. If you look in the relationships window - the relationship between the Companies and Contacts tables no longer exists.

Any ideas much appreciated.

View 5 Replies View Related

Column Names. Can I Make The Name Field "higher"? (to Make Room For More Lines)

Sep 25, 2006

I'm currently working with a form, which is in datasheet view. I have many rows which are combo boxes (yes/no), and the name is rather long. So each line (each row) spreads on to 2-3 pages to the right.What I would like to do is make the namebar, on top of every column, a little bit higher, so the name would be split into two lines, or three. Allowing me to make the width allot smaller.Here is an example of my problem:http://213.213.137.96/~terminal/columns.jpgSo my question is, can I change the height of the column name? Or is there some trick I can use?regardsFrímann Kjerúlf

View 1 Replies View Related

General :: Make A Copy Of BE File Rather Than To Make A Copy Via Code

Nov 26, 2012

Would it be ok just to make a copy of the BE file (every so often) rather than to make a copy via code?The user can then just paste over the original if it becomes corrupt.

View 4 Replies View Related

Odd Duplicates

Jul 5, 2007

Hi. I have two tables, of which i have run a duplicate query, removed the duplicates by doing an "is null" criteria, and keeping that new table.
I know though there are still more duplicates but the names may not be exactly the same, say barclays and barclays plc. so i run another query on both tables to show me the first five letters of table 1 and table 2. I can run another "is null" criteria query to find the non duplicates there. these are the unique values.

But even if there are duplicates up to the first five letters the next letter may change, for instance barcleys tractors and barclays bank. So these arent duplicates.
So can anyone come up with a way of taking the duplicate ones according to the first five letters, and maybe duplicate ones up to 10 letters, and working out which ones are the unique ones. my brain is frying.

thanks
alex

View 7 Replies View Related

Duplicates

Jul 14, 2005

Hi

I have imported a 1 column table from an external source for the sole purpose of deleting duplicates. There are over 400,000 rows. What do i need to do to identify the duplicates?

Thanks

View 2 Replies View Related

Please Help With Duplicates

Apr 11, 2007

I work at a hospital and deal with several thousand account numbers a day. I am working on an Access database that will handle some of my workload. Here is what I am facing. Lets say on some of the tables that I import there are duplicate account numbers with different totals in the end...

acct info info info amount
123456 xxxxx xxxxx xxxx 5.50
123456 xxxxx xxxxx xxxx 17.50
123456 xxxxx xxxxx xxxx 900.00
753951 xxxxx xxxxx xxxx xxxxxxxx

and so on...

is there a way that i can only show one account number but the total of the amount for the account? please help...this is desperately needed.

JG

View 6 Replies View Related

Several Pk's And Duplicates Ok?? WHAT??

Oct 9, 2007

Hey All, i'm looking for some help from one of the heavy hitters in the Access Forum. (Keep in mind i'm self-taught in access..never picked up a book on the stuff) So far i have done ok. I'v made many databases and in my opinion i have a firm grasp on the fundamentals.

I have come accross a database that I did not create which i am suppose to work on. I can do the work just find but i'm a little confused on the structure. when i looked at the relationships i noticed that many of the field names in several tables were bold (showing they were set as a primary key) So i looked at the design view of a few of these tables and noted that the primary key was set on 3 different fields. i also noticed that each field allowed duplication. Furthermore i noticed that on at least one of the tables, in the relationship window there was a relationship using the ID field which was a 1 to many. however there was a relationship on the other side of that table still using the ID field that was a many to one. How can a field have a one to many relationship and a many to one?? it can either be duplicated or it can't...right???
Anyways i also tried to duplicate this in a test database and found that when you make a table and then right click at the side of the field you wish to make as Primary key, that works fine, but doing it on another field simply switches the primary key to that field and takes it off the first one.

(as a side bar..is the only way to search this forum to go manually through all the threads to see if you can find what you need? aka...no search tools?? or did i just miss them?):confused:

View 9 Replies View Related

Duplicates

Aug 11, 2006

I have a table that has country_code, Mfr_num, Item_num, catalog_code, mfr_obsolete_code. the key is on country_code, mfr_num, and item_num. I need to find duplicates of mfr_num and catalog_code. Can anyone point me in the right direction on this?

View 14 Replies View Related

Duplicates

Jan 22, 2007

I have the data from a membership DB which has quiet a few duplicated Names and addresses (though they may have a 'type' field which is different)

I have identified these using the find duplicates wizard. Is it possible to use this query to delete the duplicated entries and leave one record.

Thanks
RussG

View 3 Replies View Related

Duplicates - PLEASE HELP

Jun 8, 2007

:confused: Duplicates

I have all my master data in my table which has a lot of duplicates (700 entries). I ran the find duplicate query offered by access, but exported the data to excel to delete all the duplicates.

My question is how do I import that updated excel list back into the duplicates query so that it updates my master data in my table?

Thanks

View 1 Replies View Related

Duplicates

Sep 6, 2007

I do not understand why this is happening but I am getting some, not all, records duplicated in the Select query on two tables. (see attached)

Can anyone explain why AND how I can make it return without duplicates.

Cheers

View 3 Replies View Related

No Duplicates...

Oct 31, 2006

Hi,

I have got a table that has following fields display on a form:

ClassNo Class Date ClassType ExecutionDate Order Quantity

The Table CLASSES has got many records which are duplicate. Mostly ClassNo is duplicated. I could have stopped duplication by restricting table not to accept duplicate values, but my requirement is such that i dont want to stop the table from accepting duplicate values. When i display the same table data on the form, all the duplicate entries are displayed.

All i need is to find a way to stop the FORM showing duplicate ClassNo Field. The Duplication restriction i wish to set only on ClassNo. If there are more than one ClassNo reptition than it should show that entry only once. For example the form looks like this:

ClassNo Class Date ClassType ExecutionDate Order Quantity
1 12-12-2006 A 12-01-2007 Ok 10
1
1
1
1
1
2 20-10-2006 A 20-11-2006 Ok 100
2
2
2
2

I wish to see the form this way:

ClassNo Class Date ClassType ExecutionDate Order Quantity
1 12-12-2006 A 12-01-2007 Ok 10
2 20-10-2006 A 20-11-2006 Ok 100

Regards,

Darno

View 3 Replies View Related







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