bcp import not happening.

  • 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.

  • shouldn't column 10 be at least one char wide?

    10 SQLCHAR 0 0 "\t" 10 column9 SQL_Latin1_General_CP1_CI_AS

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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