Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2004
    Posts
    164

    Unanswered: Append Data to a Flat file

    Hello,

    I was wondering if there was a way for me to append data to a flat file. The reason why i ask this is because i need to create a header for the report that i am exporting.

    The way i imagined this working would to be create a dts that would export the header information to a flat file and the create another dts to export the report data and appensd it to the same file that the header dts created. This might not be the correct approach so i was hoping i could get some guidance of how i can accomplish this.

    I am using SQL Server 2000.

    Thank you!

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Look up "BCP" in Books on Line (BoL) to be able to do this in SQL.
    George
    Home | Blog

  3. #3
    Join Date
    Jan 2004
    Posts
    164
    Thank you for the tip. I will look this up and post the findings.

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Unless they have changed things, BCP is not able to append to a data file. OSQL, however, can be made to append, given the proper commandline syntax (>>). At that point, however, the whole report may as well be done with a single script in OSQL. Why is Reporting Services not being considered here?

  5. #5
    Join Date
    Jan 2004
    Posts
    164
    Right. I just tryed the bcp command and it will not append to the file. I overrights it.

    I am not using reporting services because it is not installed on the box.

    Can you format the file that osql creates with pipes?

Posting Permissions

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