dbTalk Databases Forums  

Importing data to multiple tables

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Importing data to multiple tables in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
pmud
 
Posts: n/a

Default Importing data to multiple tables - 03-06-2006 , 02:00 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

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Importing data to multiple tables - 03-06-2006 , 02:48 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

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




Reply With Quote
  #3  
Old   
SQLCat
 
Posts: n/a

Default Re: Importing data to multiple tables - 03-27-2006 , 11:10 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:

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





Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.