Answered by:

Bulk insert of multiple txt files

Question

I have around 400 tab delimited files (with headers) that need to be imported on a daily basis into a single SQL2008R2 table. I don't have access to SSIS so this will need to be done a different way. I have figured out the commands to import
one file but need to do this for all the files automatically. Ideally this would be something that could be scheduled like a task.

My files have 7 columns:

Computer Name

Identity Code

Display Name

Display Version

Install Date

Uninstall String

Quiet Uninstall String

The name of my database is Inventory and the table is dbo.Software.

I am not any good at scripting or sql, so please be specific in your instructions and thank you very much for the help.

You can try the below method. I am using a variable file name with index. If the file name has no index or it is a random filename then we can define a table containing file names and use the table in the below query.

Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.