Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2007
    Posts
    56

    Unanswered: Query related to bcp command

    Hello all,

    I am using this command to load data from a csv file into table
    bcp %DBNAME%.%DB_USER%.tablename format nul -c -t ";" -f employee1.fmt -T -S %DBSERVR%

    now consider a csv file with 10000 records used for import i want to order the data in the csv file in such a way that the records are inserted first such that can i put some constrains that first 100 records will be loaded and then next hundred records. can this be done using bcp

    another way the order of data in the csv file is constant and i want the table should have the same sequence of the data rows as in the csv file can this be done using bcp ?

    Basically what i want to perform is suppose a data file contains 1000 records and want to load first 200 records and process them cause next records depends on this 200 records.
    Is there a way to keep the data order as it is of the csv file ?

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    I don't think you can do incremental loads with BCP. You may have to write your own utility to do that, I think. Also, i think the -c and -f options for bcp are mutually exclusive.

  3. #3
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    OK, I am apparently wrong. You need to look into the -F and -L (case sensitive) options for bcp.

  4. #4
    Join Date
    Sep 2007
    Posts
    56
    Thanks Mcrowley

    any reference web links which can give me some idea as to how to use this options.

    Thanks

  5. #5
    Join Date
    Mar 2007
    Location
    Holmestrand, Norway
    Posts
    332
    Ole Kristian Velstadbråten Bangås - Virinco - MSSQL.no - Facebook - Twitter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •