Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
davidk
Starting Member
5 Posts |
Posted - 2009-02-26 : 21:59:15
|
| I have some text files which was bulk copied from database tables. I need to copy those text files into tables.But i have problem with that, for example...one of the file name is "file1.txt". I dont know how many columns data is there in that file. While i am inserting into the database i need to create one table before with the name "file1"(file name).And one more thing is, how many columns the file consists of, that many columns should create in the table with the column names any thing like col1,col2,col3 with varchar(255).Basically i want to know how many column names does the file contains, with those many columns(col1,col2...) i need to create table before "BCP in ....". like that i have some hundred of files. like this i will get every day with some file name.Can any one help out this one using either BCP or any other one...Its urgent..we dont want to use DTS or SSIS package. I need script for thisAdvance thanksRegardsDavid |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|