Question

My file, .xx1, has the following format:

00|20140115
01|1234|A|5009|NewYork
01|12345|B|300|Dallas
01|12345|B|300|Texas
99|20140115|2

To load the above file into a table I have used below BCP command

%BCP% Test.dbo.test1 IN test.xx1 -S servername -T - F 2 -t^| -c

It loads the data from 3rd record to 4th record

01|12345|B|300|Dallas
01|12345|B|300|Texas

It excludes the header as well as one more record 01|1234|A|5009|NewYork and it automatically excludes the last record.

Thanks, Ramesh

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top