Results 1 to 3 of 3

Thread: bcp question

  1. #1
    Join Date
    Apr 2006
    Posts
    12

    Unanswered: bcp question

    i am trying to bcp some tables into excel files but i do not know the correct syntax to include the headers
    (headers = fields)

    my current syntax of my .bat file

    bcp dbname.dbo.table_name out where_i_put_it -Uuser_name -Ppassword -Sserver -c

  2. #2
    Join Date
    Jun 2007
    Posts
    29
    more example:
    bcp table_name out name.dat -n -Ssybasetrans -Uusername -Ppasswd

  3. #3
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    You can't get headings with bcp
    I suggest you run your select in isql
    then output the results to a file and import into excel as fixed text
    Or better yet:
    from excel, click Data, Get External Data, New Database Query
    Choose your ODBC data source defined for your Sybase database
    Enter and run your query.

Posting Permissions

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