dbTalk Databases Forums  

Importing Text files

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


Discuss Importing Text files in the microsoft.public.sqlserver.dts forum.



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

Default Importing Text files - 09-09-2003 , 08:41 PM







I have files that are dropped off at a certain folder all day long. They
all have a .txt extension.

All files have the same format. Does anyone have solution that processes
all files in folder using BCP to a SQL table.



Thanks.





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

Default Re: Importing Text files - 09-10-2003 , 01:11 AM






You could use this

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

--

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



"Andy" <Hoosbruin (AT) Kconline (DOT) com> wrote

Quote:
I have files that are dropped off at a certain folder all day long. They
all have a .txt extension.

All files have the same format. Does anyone have solution that processes
all files in folder using BCP to a SQL table.



Thanks.







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

Default Re: Importing Text files - 09-10-2003 , 09:55 PM




I looked at that solution but doesn't it need to know the name of a
specific file to start looping ?

The text file(source) seems to be where you need an actual filename. I
maybe missing something but I need to point at a directory and pickup
all files that end in .dat.

I haven't used GV's to date and that could be where I'm having trouble.




"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
You could use this

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

--

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



"Andy" <Hoosbruin (AT) Kconline (DOT) com> wrote in message
news:e6oclyzdDHA.2332 (AT) TK2MSFTNGP11 (DOT) phx.gbl...

I have files that are dropped off at a certain folder all day long.
They
all have a .txt extension.

All files have the same format. Does anyone have solution that
processes
all files in folder using BCP to a SQL table.



Thanks.









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

Default Re: Importing Text files - 09-11-2003 , 02:15 AM



To set up the package you need a file of same structure as those you intend
to import. After that i.e. at runtime then the loop provides the filenames.



--

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



"Andy" <Hoosbruin (AT) Kconline (DOT) com> wrote

Quote:
I looked at that solution but doesn't it need to know the name of a
specific file to start looping ?

The text file(source) seems to be where you need an actual filename. I
maybe missing something but I need to point at a directory and pickup
all files that end in .dat.

I haven't used GV's to date and that could be where I'm having trouble.




"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message
news:eLU5UJ2dDHA.3596 (AT) tk2msftngp13 (DOT) phx.gbl...
You could use this

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

--

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



"Andy" <Hoosbruin (AT) Kconline (DOT) com> wrote in message
news:e6oclyzdDHA.2332 (AT) TK2MSFTNGP11 (DOT) phx.gbl...

I have files that are dropped off at a certain folder all day long.
They
all have a .txt extension.

All files have the same format. Does anyone have solution that
processes
all files in folder using BCP to a SQL table.



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.