Bcp load is skipping records sporadically

  • I have a TXT file that I use to run a BCP command that has 2576 records that are 400 characters wide. When I load the data with the bcp command I only load 2,321 records. The records that are skipped are located sporadically within the input file. BCP writes nothing to the error file and the command completes successfully. All the fields in the table (there are 32 of them) seem to have the correct data in the columns for the records that are loaded. Can anyone give me an idea on what possibly could cause this? Thanks, in advance, Bill Hoover

    William H. Hoover

    Louisville, Ky

    sweeper_bill@yahoo.com


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

  • fyi... I finally found this at http://www.microsoft.com. When the last field in a file is bypassed, (sqlcol = 0) and the last character in that field is equal to the file terminator character, there is a bug in bcp that will cause the program to skip the file. I fixed this by moving an 'x' to the last column of the unused field. The field terminator was ""

    William H. Hoover

    Louisville, Ky

    sweeper_bill@yahoo.com


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

  • Thanks for the followup. Do you remember the Q article?

    Steve Jones

    steve@dkranch.net

  • Sorry the Q number is Q303515. Thanks

    William H. Hoover

    Louisville, Ky

    sweeper_bill@yahoo.com


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

Viewing 4 posts - 1 through 3 (of 3 total)

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