BCP FILE TO TABLE

  • BCP Newbie, here.

    I have a data (name.dat) file in a folder and need to BCP it to a SQL Server 2000 table.  The dat file sits in a folder on the same server containing SQL.

    The table has already been created (empty, of course)

    I am very new to this, so any help would be greatly appreciated.

  • Your best place to start would be to lookup the syntax in Books Online. You could also use DTS to create a format file for the BCP (makes things a little easier if you are matching the columns in the file to those in the table).



    Shamless self promotion - read my blog http://sirsql.net

  • BCP is fabulous because it's fast. One undocumented, and altogether nifty little "feature" is that you cannot count on BCP to maintain the original order of the data in the file. We had to write a little command line program for our firewall data imports.

    good luck

    EC

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

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