Results 1 to 2 of 2

Thread: BCP fail

  1. #1
    Join Date
    Mar 2002

    Unanswered: BCP fail


    I'm a newbie to MSQL trying to examine ways in which I can work with a client's data. I'm using the evaluation version of MSQL.

    I'm trying to import data from a .dat file created using bcp by the client. The row delimiter is '#'.

    I have created a table with the same amount of columns, varchar, 255, nulls allowed. My bcp command is:

    bcp dbase_name..table_name in D:\tables\table.dat -n -o D:\tables\error.err -U MyUser -P MyPass -S Myserver

    This returns the following error:

    SQLState = 22001, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
    SQLState = S1000, NativeError = 0
    Error = [Microsoft][ODBC SQL Server Driver]Unexpected EOF encountered in BCP data-file

    As I understand, this indicates that the format of the destination table is not appropriate for import. However, I am unable to see what further parameters I should specify in the destination table. What have I overlooked?

    All help appreciated - thanks for your indulgence.

    James Toner

  2. #2
    Join Date
    Feb 2002
    S.E. London
    I don't know if you ommited this by mistake but if you are using a
    row terminator of # then shouldn't also be including -r# in your
    bcp in command ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts