Hello.
I need to import text files over a four year period (which is well over 1000 text files). The text files are tab delimited (text is organized in columns...tab delimited right?) and I only want 4 columns from the files.
The text files have headers. I was thinking that my best option would be to use the bcp utility.
1) How would I properly use bcp to import the data into my table DUMP_Vids?
2) I also wanted an error log so that I could see what occurred during the import.
3) Is there also a way to import using conditions from the text files too?
This is what I have so far:
Thank you in advance.
I need to import text files over a four year period (which is well over 1000 text files). The text files are tab delimited (text is organized in columns...tab delimited right?) and I only want 4 columns from the files.
The text files have headers. I was thinking that my best option would be to use the bcp utility.
1) How would I properly use bcp to import the data into my table DUMP_Vids?
2) I also wanted an error log so that I could see what occurred during the import.
3) Is there also a way to import using conditions from the text files too?
This is what I have so far:
Code:
/*BCP Import to pull in records from a directory to DUMP_Vids table*/
bcp DUMP_Vids in "I:\My Documents- Episodes\Video Logs" -c -T -e
Thank you in advance.