primary key problem

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?
 
M

[MVP] S. Clark

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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
J

John Vinson

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)?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top