dbTalk Databases Forums  

using bcp to get multiple files into a table

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


Discuss using bcp to get multiple files into a table in the microsoft.public.sqlserver.dts forum.



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

Default using bcp to get multiple files into a table - 03-05-2004 , 12:39 PM






I have around 10 txt files....I want to bcp them into a single table
dtproperties.....is there a way to do that?...I want to do something
like this...

bcp db.owner.table in *.txt

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

Default Re: using bcp to get multiple files into a table - 03-06-2004 , 06:29 PM






Simply build a Loop on the directory and do it that way. We have an example
here

Looping, Importing and Archiving
(http://www.sqldts.com/default.aspx?246)

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
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


"sudha" <saisudhas (AT) hotmail (DOT) com> wrote

Quote:
I have around 10 txt files....I want to bcp them into a single table
dtproperties.....is there a way to do that?...I want to do something
like this...

bcp db.owner.table in *.txt



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

Default Re: using bcp to get multiple files into a table - 03-06-2004 , 09:21 PM



I was just trying to get your example (Looping...) to work and it gives me Source File Directory and Archive File Directory not found, errors. I have specified the correct file as source and the correct destination. What's the problem? Can I post something to make this more clear as to what may be wrong

Thanks

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

Default Re: using bcp to get multiple files into a table - 03-07-2004 , 04:21 AM



The source and destination directories are just that, directories, not
files. Do you have permissions to those directories?

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
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


"Paul" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
I was just trying to get your example (Looping...) to work and it gives me
Source File Directory and Archive File Directory not found, errors. I have
specified the correct file as source and the correct destination. What's
the problem? Can I post something to make this more clear as to what may be
wrong?
Quote:
Thanks



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.