Results 1 to 2 of 2
  1. #1
    Join Date
    May 2016
    Posts
    1

    Unanswered: Formated text flat file

    Hi

    People

    I'm new with sybase, I work with DB2 Mainframe, do you know how can I create/export a formatted flat files with sybase sql query result set

    Thank you

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    Use bcp to export data
    create a view with your specific query and bcp out from the view
    Or use --initstring of bcp to save query output to a temp table
    e.g.
    Code:
    bcp "#t1" out t1.txt -X -Ume -P`cat ~/.mypw` -Smysrv -c --initstring "select number into #t1 from master..spt_values where type='P'"

Posting Permissions

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