March 25, 2010 at 5:38 am
I have a very large data to be imported using bcp the table contains around 100,000 rows.The data has to imported from Temp to Temp1 table.I use two bcp commands one to generate the format file and the other for actual import.Temp.txt text file contains the data exported
from Temp table to (Temp.txt) file with tab as column delimiter and as row delimiter.
bcp database_name.dbo.Temp format nul -c -f myTeam.Fmt -U username -S server
bcp database_name.dbo.Temp1 in Temp.txt -U username -S server -f myTeam.Fmt
I am recieving this error
sqlstate = 22005, NativeError = 0
ERROR = [Microsoft][ODBC SQL Server Driver]Invalid character value for cast specification
BCP Copy in failed
My Format file is attached,when i did a debug I think the problem is in bit column.
March 25, 2010 at 7:05 am
shouldn't column 10 be at least one char wide?
10 SQLCHAR 0 0 "\t" 10 column9 SQL_Latin1_General_CP1_CI_AS
Lowell
March 25, 2010 at 7:29 am
The format file for Varchar(max) is 0 and it works fine I think the bit field is or the one causing the problem.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply