BCP files

  • I have been asked to look at the data within a number of files with a BCP extension.

    According to BOL I should be able to stuff the data into a temporary table however I have no idea what the internal format of the BCP file is in and therefore I cannot create a suitable temporary table.

    How do I examine the BCP files?

  • If all you have to do is look at the files, why not just open them up with a good text editor?

  • I have, but they appear to be in some form of binary format.

  • It sounds like the BCP files may have been created in a BCP OUT operation employing the '-n', i.e., native format.  If this is the case, then the best way to get a look at the contents would be:

    1. Find a CREATE TABLE template matching the table from which the BCP file was produced.
    2. Use the template to create this table in 'tempdb'.
    3. Use BCP IN with the -n option into this new 'tempdb' table.
    4. Hope it works.

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

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