I need assistance importing flat file data to a relational database....

K

Kelvin Beaton

I have a contact database that I need to import data into on a weekly basis.
The data is in an Excel file with client and contact information all in one
record (one row).

I need all the client data to go in the client table, and the contact
information to go in the contact table.
I need to import the "ReasonForContact" into the ContactData table.

Here are the basic fields in the two tables

tbl_ClientData
ClientID
FirstName
LastName
Address
City
State
Zip

tbl_ContactData
ContactLogID
ClientID
ContactDate
ContactTime
ContactNotes
ReasonForContact

Any help would be appreciated!!!

Thanks

Kelvin
 
G

Guest

There are two ways to do this. One would be to link to the Excel file rather
than import it. (my preferred technique) or import it into a table that has
the same structure as the spreadsheet.
Then create two append queries. One to append the client data to the client
table and one to append the contact data to the contact table.
 
K

Kelvin Beaton

Thanks Dave

I understand that part.
But how do I link the data?
How do I get the clientID from the Client table to populate the Contact
table?

Thanks

Kelvin
 
G

Guest

How do you identify the client in the flat file? by name?
If so, you will have to include the client table in the query for the
contact table.
Join it on name and use the result of that join to identify the client id.
 

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