Discussion:
Importing Multiple Text Files
(too old to reply)
John Renkar
2009-03-11 19:15:06 UTC
Permalink
I have 31 folders and each has 288 .txt files. I need to import them into
SQL Server 2005. I have been using Access, but the process is slow. (3
folders in an 8 hour shift) Someone suggested that DTS would be the way to
go. Can anyone suggest a web site that could guide me in setting this up?
I have been in Online Books, and it is not helping me.

Thank You

John
Todd C
2009-03-11 21:19:02 UTC
Permalink
If you have SQL 2005, try SSIS.
Right-click on the Database name and select Tasks >> Import Data
Follow the prompts. Save (but do not run) the resulting package. Then go in
and inspect what it created. That's a great way to learn the tools.

HTH
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]
Post by John Renkar
I have 31 folders and each has 288 .txt files. I need to import them into
SQL Server 2005. I have been using Access, but the process is slow. (3
folders in an 8 hour shift) Someone suggested that DTS would be the way to
go. Can anyone suggest a web site that could guide me in setting this up?
I have been in Online Books, and it is not helping me.
Thank You
John
John Renkar
2009-03-11 21:46:12 UTC
Permalink
I think I got that part, but how do I get that to loop through the folders
and files to import all the data? I do not want to have to create one for
each file.
Post by Todd C
If you have SQL 2005, try SSIS.
Right-click on the Database name and select Tasks >> Import Data
Follow the prompts. Save (but do not run) the resulting package. Then go in
and inspect what it created. That's a great way to learn the tools.
HTH
--
Todd C
[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]
Post by John Renkar
I have 31 folders and each has 288 .txt files. I need to import them into
SQL Server 2005. I have been using Access, but the process is slow. (3
folders in an 8 hour shift) Someone suggested that DTS would be the way to
go. Can anyone suggest a web site that could guide me in setting this up?
I have been in Online Books, and it is not helping me.
Thank You
John
Todd C
2009-03-12 13:33:01 UTC
Permalink
John:
Are all the text files of the same meta-data? Do they all go to the same
destination table (in SQL)?

If so, you may need to create your first SSIS package and use the For Each
loop on the Control Flow. Then read this:

http://toddchitt.wordpress.com/2008/11/04/ssis_flat_loop

HTH

(If you have questions, you can leave a response at the blog site and I will
respond personally.)
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]
Post by John Renkar
I think I got that part, but how do I get that to loop through the folders
and files to import all the data? I do not want to have to create one for
each file.
Post by Todd C
If you have SQL 2005, try SSIS.
Right-click on the Database name and select Tasks >> Import Data
Follow the prompts. Save (but do not run) the resulting package. Then go in
and inspect what it created. That's a great way to learn the tools.
HTH
--
Todd C
[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]
Post by John Renkar
I have 31 folders and each has 288 .txt files. I need to import them into
SQL Server 2005. I have been using Access, but the process is slow. (3
folders in an 8 hour shift) Someone suggested that DTS would be the way to
go. Can anyone suggest a web site that could guide me in setting this up?
I have been in Online Books, and it is not helping me.
Thank You
John
John Renkar
2009-03-12 14:49:43 UTC
Permalink
Thank you. That is exactly what I needed.
Post by Todd C
Are all the text files of the same meta-data? Do they all go to the same
destination table (in SQL)?
If so, you may need to create your first SSIS package and use the For Each
http://toddchitt.wordpress.com/2008/11/04/ssis_flat_loop
HTH
(If you have questions, you can leave a response at the blog site and I will
respond personally.)
--
Todd C
[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]
Post by John Renkar
I think I got that part, but how do I get that to loop through the folders
and files to import all the data? I do not want to have to create one for
each file.
Post by Todd C
If you have SQL 2005, try SSIS.
Right-click on the Database name and select Tasks >> Import Data
Follow the prompts. Save (but do not run) the resulting package. Then
go
in
and inspect what it created. That's a great way to learn the tools.
HTH
--
Todd C
[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]
Post by John Renkar
I have 31 folders and each has 288 .txt files. I need to import them into
SQL Server 2005. I have been using Access, but the process is slow.
(3
folders in an 8 hour shift) Someone suggested that DTS would be the
way
to
go. Can anyone suggest a web site that could guide me in setting this up?
I have been in Online Books, and it is not helping me.
Thank You
John
Loading...