Reputation: 614
I am using BCP in MSSQL for importing flat file data into table. File has line feed character (0A) as row separator.
I am using below bcp query to import file
bcp dbo.BCPTest in O:\BCPTest\test.txt -c -t| -r 0x0A -T -h TABLOCK
BCP is not able recognize line feed character correctly and importing file incorrectly. Am I giving record separator correctly. Please help me to resolve this issue.
Upvotes: 1
Views: 1668
Reputation: 11
It seems your BCP command is wrong. Try this :
bcp dbo.BCPTest in O:\BCPTest\test.txt -c -t "|" -r 0x0A -T -h TABLOCK
Upvotes: 1