dbTalk Databases Forums  

Import Text into Multiple tables

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


Discuss Import Text into Multiple tables in the microsoft.public.sqlserver.dts forum.



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

Default Import Text into Multiple tables - 04-12-2004 , 05:15 PM






I have seen the import examples from sqldts
(http://www.sqldts.com/default.aspx?246) but was wondering
if there is anyway to automate the importing of multiple
text files with each text file going into a separate SQL
table. The format of the text files are all the same.

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

Default Re: Import Text into Multiple tables - 04-13-2004 , 12:10 AM






You would ideally need to build a datapump for each table.
I would seperate the files into folders according to destination.
Each DataPump would then source from only one folder.

Once you have this setup then it is plain sailing from there.

The problem with the

1 Datapump - Sourcing many formats of file into many different tables

is that you would need to rebuild the datapump mappings every time and that
is costly.

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"csl" <cslatta (AT) carolina (DOT) rr.com> wrote

Quote:
I have seen the import examples from sqldts
(http://www.sqldts.com/default.aspx?246) but was wondering
if there is anyway to automate the importing of multiple
text files with each text file going into a separate SQL
table. The format of the text files are all the same.



Reply With Quote
  #3  
Old   
Darren Green
 
Posts: n/a

Default Re: Import Text into Multiple tables - 04-13-2004 , 03:28 PM



In message <1704901c420db$a424ac50$a001280a (AT) phx (DOT) gbl>, csl
<cslatta (AT) carolina (DOT) rr.com> writes
Quote:
I have seen the import examples from sqldts
(http://www.sqldts.com/default.aspx?246) but was wondering
if there is anyway to automate the importing of multiple
text files with each text file going into a separate SQL
table. The format of the text files are all the same.
If the text files are all the same format then I don't see why the
article you mentioned could not be used for this. You currently change
the source filename, so at the same time you could change the
destination object name.

I think Allan must have missed the comment about being the same format.

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



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

Default Re: Import Text into Multiple tables - 04-13-2004 , 03:46 PM



No he read it as 20 source definitions and 20 seperate destinations. I read
it as all the 20 destinations are of differing structures. I therefore may
have misread the fact that all these tables have the exact same structure in
the same DB if that is the case because I thought that kinda strange !!



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote

Quote:
In message <1704901c420db$a424ac50$a001280a (AT) phx (DOT) gbl>, csl
cslatta (AT) carolina (DOT) rr.com> writes
I have seen the import examples from sqldts
(http://www.sqldts.com/default.aspx?246) but was wondering
if there is anyway to automate the importing of multiple
text files with each text file going into a separate SQL
table. The format of the text files are all the same.

If the text files are all the same format then I don't see why the
article you mentioned could not be used for this. You currently change
the source filename, so at the same time you could change the
destination object name.

I think Allan must have missed the comment about being the same format.

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org




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.