Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing Data 1

Status
Not open for further replies.

Mary10k

IS-IT--Management
Nov 8, 2001
103
US
Hello,
I have 150+ text files which I need to import into SQL server. Any suggestions how I can do this without going through each text file individually? Would it be possible to write code to import all of these files at the same time or loop through each file until all have been imported?

Thank you.
 
Check the Online Books for help with DTS (Data Transformation) jobs. I believe there is something about being able to pull in files via a batch file or a DTS package.

A DTS package should enable you to pull in chucks of your files at the same time.

Some things to think about first. Do all these text files have the same format? I.E., all comma delimited, not some comma delimited, some tab delimited, etc? Also, is the data structure of each text file the same? Are the columns all in the same order? Are the files all going into the same table?

These are very important questions that you should have the answers to before attempting any DTS job. If the answer is No to all of the above questions, then you have a lot of work ahead of you and there is no easy answer.

Hope this helps!



Catadmin - MCDBA, MCSA
Remember, "Work" is a four letter word. And you know what your mother told you about using four letter words!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top