Home Forums Programming XML saving XML stream to a file RE: saving XML stream to a file

  • You may want to try using an OSQL window to run the SP, then redirect the output to a file.

    for example:

    execute('MASTER.DBO.XP_CMDSHELL ''OSQL -U UserName -P ' -|- @PASSWORD -|- ' -Q "EXECUTE DataBase.DBO.SP_Name " -w116 -o' -|- @LOCATIONOFOUTPUTFOLDER -|- '\OutputFilename.TXT''')

    note -|- is a plus sign, but the forum interface keeps deleting them.