Results 1 to 2 of 2

Thread: BCP fail

  1. #1
    Join Date
    Mar 2002
    Posts
    1

    Unanswered: BCP fail

    Hi,

    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
    Location
    S.E. London
    Posts
    5
    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
  •