E J Pope
asked on
BULK INSERT issue
I am trying to bring a group of .txt files into my SQL database.
I have been able to get 1 file to load, but have the following issues.
1) the first row of the file is being skipped by the insert
2) I need the name of the .txt file to be a field
Can anyone help me or point me in the right direction?
Cindy
(please be gentle, I am a novice.)
Table creation, Insert and Results attached.
Test file attached.
I have been able to get 1 file to load, but have the following issues.
1) the first row of the file is being skipped by the insert
2) I need the name of the .txt file to be a field
Can anyone help me or point me in the right direction?
Cindy
(please be gentle, I am a novice.)
Table creation, Insert and Results attached.
Test file attached.
There are no attachments. Attach your scripts.
ASKER
I meant the first COLUMN!
ASKER
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Such enthusiam for a newbie...thanks
1. Did you see that I miswrote? I am not getting the first column. The first row is coming in fine.
2. I thought of that. I also thought about building my own txt file by using the one I have and copying in the parts I want and adding the file name. There are several fields I don't care about, but I don't want to ALTER the table after the INSERT since I am going to be inserting hundreds of files to this table daily. What do you think of me building my own txt file and them inserting it?
1. Did you see that I miswrote? I am not getting the first column. The first row is coming in fine.
2. I thought of that. I also thought about building my own txt file by using the one I have and copying in the parts I want and adding the file name. There are several fields I don't care about, but I don't want to ALTER the table after the INSERT since I am going to be inserting hundreds of files to this table daily. What do you think of me building my own txt file and them inserting it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Jim and Sharath. Your help was invaluable to my project.