Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003
    Posts
    18

    Unanswered: OSQL - appending output to a file

    I want to run a job every hour which calls a stored proc using osql and apppends the results to a text file.

    But it always overwrites the previous results. Is there a way of getting osql to append the results instead?

  2. #2
    Join Date
    Oct 2002
    Location
    BC, Canada
    Posts
    17

    Re: OSQL - appending output to a file

    Originally posted by mwilkes
    I want to run a job every hour which calls a stored proc using osql and apppends the results to a text file.

    But it always overwrites the previous results. Is there a way of getting osql to append the results instead?
    Good old DOS, you should use batch file to append OSQL results into existing text file, named differently than the one used in OSQL output, something like:

    osql ... > Osql.Txt

    Type Osql.Txt >> FinalResult.Txt

    Where FinalResult.Txt contains all, appended results.

    Cheers, Marin
    Marin Kostadinovic
    ----------------------------
    DBA
    DIMM Info Systems Inc.


Posting Permissions

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