PC Review


Reply
Thread Tools Rate Thread

create table records

 
 
Gerry_B
Guest
Posts: n/a
 
      27th Feb 2004
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
 
Reply With Quote
 
 
 
 
John Vinson
Guest
Posts: n/a
 
      27th Feb 2004
On Thu, 26 Feb 2004 17:06:49 -0800, "Gerry_B"
<(E-Mail Removed)> wrote:

>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.

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Modify records and create a calculated field and add those records to a table Bob Microsoft Access VBA Modules 1 23rd Mar 2007 07:38 AM
Create new excel table with filtered records from another table =?Utf-8?B?QmVybmUgdmFuIGRlIExhYXI=?= Microsoft Excel Worksheet Functions 3 3rd Jul 2006 12:14 AM
Create New Records in a Table by Copying Existing Records =?Utf-8?B?UnlhbkpMSA==?= Microsoft Access Queries 3 10th Mar 2006 08:11 PM
Create new table from existing table (adding records) Lex Microsoft Access 0 3rd Sep 2004 06:19 PM
Create records in a table =?Utf-8?B?RGFuaWVsIFA=?= Microsoft Access VBA Modules 5 16th Apr 2004 04:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:30 PM.