Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Posts
    4

    Unanswered: bcp with table name

    HI,
    i want to export data from a sql table to a csv file with a the name of each colunms in the csv file
    i use this script

    bcp [databasename.owner.table ]out [path.csv] -t, -c -Uuser -Ppass -Sservername

    i want to put each column name in my csv file.

    Sorry for my english, i'm not fluency in english

    Thanks,
    Patrick

  2. #2
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Use OSQL instead.

  3. #3
    Join Date
    Dec 2001
    Location
    Toronto, Canada
    Posts
    335
    Use DTS, you can export the data to a CSV file and I believe there is an option to include headers (column headers) into the CSV file.
    MCDBA

Posting Permissions

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