create table records

  • Thread starter Thread starter Gerry_B
  • Start date Start date
G

Gerry_B

I have imported a flat file containing too many fields.
I want to break this up into different tables.
For example the flat file contains Account, Contact and
address information. I have designed seperate table for
Account, contact and address. Can I setup a query to
iterate through the flat file copy certain fields into a
new record in Account, other fields into a related record
in the Contact table etc.

I would be very grateful for any assistance anyone may
provide.

Gerry_B
 
I have imported a flat file containing too many fields.
I want to break this up into different tables.
For example the flat file contains Account, Contact and
address information. I have designed seperate table for
Account, contact and address. Can I setup a query to
iterate through the flat file copy certain fields into a
new record in Account, other fields into a related record
in the Contact table etc.

I would be very grateful for any assistance anyone may
provide.

Gerry_B

Yes, this is pretty standard query work for this kind of situation.

Create several Append queries based on your wide-flat table selecting
the relevant fields. Start with the "one" side table fields if (as I
think likely) the wide-flat table contains duplicate values; you can
set the Unique Values property of the query to True as appropriate.
You may need to use an Autonumber field in the new table as a Primary
Key if your Account doesn't have an ID that can tie all the records
for an account together.

It will take several Appends (one for each target table) and possibly
some Update queries (if you need to assign a new ID) but it's
straightforward.
 
Back
Top