primary key problem

  • Thread starter Thread starter C Wood
  • Start date Start date
C

C Wood

I have many tables connected by union query. There is
some problem with duplicate primary keys. Can I setup a
query to delete all primary keys and assign new ones?
 
I can't say that I understand "connected by union query", but you can always
delete the column, add a new column as AutoNumber.

--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
I have many tables connected by union query. There is
some problem with duplicate primary keys. Can I setup a
query to delete all primary keys and assign new ones?

A UNION query is ipso facto not updateable; and if there are duplicate
PK's in different tables, you'll need to update each table
individually. Why do you have multiple tables in the first place?
Could you base an APPEND query on the union query and migrate all the
data into a single master table, assigning new autonumber values to
all the records? (Or do you have links from these tables to related
tables... and if so, how do you resolve the duplicates for THOSE
tables)?
 
Back
Top