Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
BrianG86
Starting Member
1 Post |
Posted - 2014-04-15 : 12:13:49
|
Hi, I am very new to SQL and am just trying to fix, and amend some things that our previous SQL expert had in place.I have a job on SQL server agent on SSMS that runs daily, however, I have no idea where the results go as the query wont appear on the screen.I want to have it automatically save the results from the query to a .csv or an. xlsx file in a specified folder.Can this be done?Thanks |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2014-04-15 : 13:34:06
|
What does the agent job do? Does it run a query or an Integration services package or something else? |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2014-04-15 : 13:34:43
|
Not really clear on what your question is. If you are looking for a generic way to have the output of a sql statement saved to file you can't do that with straight t-sql. You could use BCP for that.>>job that runs daily, however, I have no idea where the results go.A job doesn't necessarily return results anywhere. If you want help with this job probably first thing to do is look at the job steps. look at the "type" and "cmd" of each step and report back any questions you have.Be One with the OptimizerTG |
|
|
|
|
|