Home > Archive > MS SQL Server DTS > March 2006 > Importing data to multiple tables









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Importing data to multiple tables
pmud

2006-03-06, 7:18 pm

Hi,

I need to import data from a single text file to different tables; i.e from
one text file, different fields need to go to different tables in the
database.

Is it possible to do that and how?

Thanks for any help.
--
pmud
Allan Mitchell

2006-03-06, 7:18 pm

Hello pmud,

Yes you can do it and you can do it in a number of ways

1. Use a datapump task and Lookups. The lookups do the inserting for you
and you pass the fields that need to go to each output to the correct lookup.
2. Read the file twice ergo two datapump tasks and pipe the correct attributes
to the right table
3. Read the file into a staging table and then use TSQL to do the correct
inserts.


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

> Hi,
>
> I need to import data from a single text file to different tables; i.e
> from one text file, different fields need to go to different tables in
> the database.
>
> Is it possible to do that and how?
>
> Thanks for any help.
>



SQLCat

2006-03-27, 11:31 am

I don't see a data pump task?? I have the same issue. I have a flat file
that has some 200K rows of INSERT INTO statements that I need to load into
different tables. How can I do this?

"Allan Mitchell" wrote:

> Hello pmud,
>
> Yes you can do it and you can do it in a number of ways
>
> 1. Use a datapump task and Lookups. The lookups do the inserting for you
> and you pass the fields that need to go to each output to the correct lookup.
> 2. Read the file twice ergo two datapump tasks and pipe the correct attributes
> to the right table
> 3. Read the file into a staging table and then use TSQL to do the correct
> inserts.
>
>
> Allan Mitchell
> www.SQLDTS.com
> www.SQLIS.com
> www.Konesans.com
>
>
>
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com