Replace values with a foreign key.

G

Gluefoot

Hi everyone, fairly new to Access. I have a table "TRACKING" with a column
that has USER_NAMES. There are about 3000 records in this table. I'd like to
replace the names in this user name column with a USER_ID that is a primary
key on a new USER table, is there a quick way to do this in Access?

Thanks in advance for help.
 
J

John W. Vinson

Hi everyone, fairly new to Access. I have a table "TRACKING" with a column
that has USER_NAMES. There are about 3000 records in this table. I'd like to
replace the names in this user name column with a USER_ID that is a primary
key on a new USER table, is there a quick way to do this in Access?

Thanks in advance for help.

Not real quick but it certainly can be done. Are the names unique or repeated?
How are they stored - "John V. Doe" in the USER_NAMES field (not ideal) or
fields such as FirstName, LastName, MiddleName? do you already have a new USER
table or are you trying to create one?

In essence, what you'll need is to create a new USER table with a UserID
primary key, probably an autonumber, and run an appropriate Append query to
migrate data from the USER_NAMES field. What's appropriate depends on what's
now in the field... examples would be helpful.
 

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