BCP error

  • I'm trying to upload a text file using BCP into my Source table. I'm getting this error:

    SQLState = 22001, NativeError = 0

    Error = [Microsoft][SQL Native Client 10.0]String data, right truncation

    How can I fixed this?

    Use test

    go

    create table Source (

    id_adcount VARCHAR (50) NOT NULL,

    adcount_Descrip VARCHAR(50) NOT NULL);

    bcp test.dbo.Source in C:\Users\IPMAX\bcpFiles\AdmitSource\Source_20100615.txt -P xxxx -U xxxx -S myserver -c -t "|" -r"/n"

  • It's telling you that the columns in the input are longer than your table columns. You may have to make the columns bigger, or the error may actually indicate something else. If you add the -e flag with an error file name, you'll get a better idea of where the errors are happening.


    And then again, I might be wrong ...
    David Webb

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply