Results 1 to 3 of 3

Thread: bcp command:

  1. #1
    Join Date
    Feb 2004
    Location
    Bangalore, India
    Posts
    250

    Unanswered: bcp command:

    im using bcp to export data from MyTable to MyTable.bcp file

    the command is in a batchfile, ExportData.bat which i invoke from the command prompt.

    ExportData.bat:

    bcp MyDB.Dbo.MyTable out MyTable.bcp -N -U<user> -P<password> -S<Server>

    is there any method to retrieve the number of rows exported by bcp ommand?
    (apart from the messages printed in the command prompt)
    Cheers....

    baburajv

  2. #2
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Not that I know of, but you can get this info from the following query:

    select sum(rows) from MyDB.sys.partitions
    where object_id = object_id('MyDB.Dbo.MyTable')
    and index_id <= 1
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  3. #3
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696
    Use a dos command such as

    findstr /R /N ^ file.txt

Posting Permissions

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