BCP question

  • I have a bcp file that I do not understand what is happening with it. I have a table that has a unique index, when I run a bcp file and there is a duplicate key, 1) the record is not written to the error file, 2.) the command says it is terminated, and the count of the rows copied equals the the number of rows in the file.

    I thought bcp would allow 10 errors unless specified differently. I also thought these errrors would be placed in the .err file, and I did not expect the total record count to be copied. Any help you can give in me understanding why this is happening would be greatly apppreciaited

    William H. Hoover

    Louisville, Ky

    sweeper_bill@yahoo.com


    William H. Hoover
    Louisville, Ky
    sweeper_bill@yahoo.com

  • I never rely on the number of records copied as reported by bcp.

    I always get a control file from thye source which contains summary info (e.g. no. of recs) and check this against what is actually delivered to the table (and always bcp into a separate database in case it decides to overwrite the wrong things).

    bcp has a habit of concatenating rows if it gets a short one and not reporting an unless it happens to have invalid datatypes in the concatenated data.

    From what you say it sounds like bcp has not detected the error reported by the constraint violation - call me a cynic but this wouldn't surprise me too much.

    Have you tried the check_constraints hint?

    Edited by - nigelrivett on 02/18/2002 09:56:54 AM


    Cursors never.
    DTS - only when needed and never to control.

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

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