June 13, 2008 at 11:48 am
I am loading data from .txt file with selected column only. (4 fields out of 40 fields)
I had created a .fmt file
It shows error as invalid column number.
How to specify field order in .fmt file?
Its from 1,2,3,4 or column order?
I need to get 1,5,7,10 column values from file.
Destination table contains 4 columns as 1,2,3,4 positions only..
June 13, 2008 at 2:26 pm
[font="Arial"]
Hello,
Are you restricted to using bcp? Could you use DTS instead as this would be an almost no brainer there.
If you pull the .fmt file up in an editor, you can see how it's organizing the fields.
Regards,
Terry
[/font]
June 13, 2008 at 9:02 pm
sharma (6/13/2008)
I am loading data from .txt file with selected column only. (4 fields out of 40 fields)I had created a .fmt file
It shows error as invalid column number.
How to specify field order in .fmt file?
Its from 1,2,3,4 or column order?
I need to get 1,5,7,10 column values from file.
Destination table contains 4 columns as 1,2,3,4 positions only..
You're cheating... asking the same question on two different forums and still not providing enough information will not get you an answer any quicker. 😉
http://www.sqlservercentral.com/Forums/Topic516087-338-1.aspx
So, here's what you need to do... go back to your other post and attach the first 10 lines of the file along with what the record layout is supposed to be... just like I asked you to there... then, we can answer your question... I know what you're trying to do and I can help, but I need you to attach the data I asked for and to post the record layout (or attach it).
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply