SQL Jobs Output
-
Hello CP, I've set up a job to perform a stored procedure at a given time, nothing special. In the step (which triggers the SP) I've specified the output file in the 'advanced' section. The output in the file is the execution time (moment) and the 'select' form the SP. My problem is the output file format. Does anyone know how to set it to CSV or perhaps another solution?
-
Hello CP, I've set up a job to perform a stored procedure at a given time, nothing special. In the step (which triggers the SP) I've specified the output file in the 'advanced' section. The output in the file is the execution time (moment) and the 'select' form the SP. My problem is the output file format. Does anyone know how to set it to CSV or perhaps another solution?
Is the goal to get the data output from the stored procedure into a CSV file? That is not possible (in a useable format anyway) in the job step's advanced properties. Specifying a file path and file name there allows SQL to save the detailed information regarding the job's execution to a text file. To get your stored proc output data into a CSV file, a different coding approach is needed (like SSIS, BCP, or the like). Or, did you actually want to get the detailed information about the job running into a CSV file? Apologies if I've misunderstood your question. :cool:
modified on Thursday, June 23, 2011 5:41 PM
-
Is the goal to get the data output from the stored procedure into a CSV file? That is not possible (in a useable format anyway) in the job step's advanced properties. Specifying a file path and file name there allows SQL to save the detailed information regarding the job's execution to a text file. To get your stored proc output data into a CSV file, a different coding approach is needed (like SSIS, BCP, or the like). Or, did you actually want to get the detailed information about the job running into a CSV file? Apologies if I've misunderstood your question. :cool:
modified on Thursday, June 23, 2011 5:41 PM
You understood it perfectly. I had been looking at BCP and tried to format it correctly (from the command prompt, not sqlcmd), but it bugged on my nested stored procedures. Haven't looked at SSIS yet, gonna do that now. But I'm getting off-topic. You answered my question.