Merge data from one table into another table

X

xpnovice

Hi,

I have a table that contains customer details, including a unique CustId
field. There is also another table with only two fields, CustId and
CustRef. The CustRef is also a unique field required by a different
department.

I want to combine this data all into the main customer table and ditch the
two field table.

I have added a new field to the main table to accommodate the CustRef data
but would like to merge this data automatically to save entering a few
thousand records manually.

Any ideas please.

Example:

Main Table:

CustId CustRef Forename Surname
01397 Martin Jones

CustRef currently empty as I have not transferred the data.

Additional Table:

CustId CustRef
01397 AR9723

How do I get the main table reading:

CustId CustRef Forename Surname
01397 AR9723 Martin Jones

Thanks
John
 
J

Joseph Meehan

xpnovice said:
Hi,

I have a table that contains customer details, including a unique
CustId field. There is also another table with only two fields,
CustId and CustRef. The CustRef is also a unique field required by a
different department.

I want to combine this data all into the main customer table and
ditch the two field table.

I have added a new field to the main table to accommodate the CustRef
data but would like to merge this data automatically to save entering
a few thousand records manually.

Any ideas please.

Example:

Main Table:

CustId CustRef Forename Surname
01397 Martin Jones

CustRef currently empty as I have not transferred the data.

Additional Table:

CustId CustRef
01397 AR9723

How do I get the main table reading:

CustId CustRef Forename Surname
01397 AR9723 Martin Jones

Thanks
John


This is a job for an update query.
 
X

xpnovice

Yes,

Ive just worked it out, I needed to ref the table/field names in the updata
to:

Thanks
 

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