Save query results to File

Save query results to File

 

  

Hello and happy Friday!

I want to run a scheduled task that produces a list, save the results to
a file and send that file to a person via email all in one shot.

I can already send emails via scheduled tasks.

Is it possible to run a query, save the result to a text file and send
that text file via email?

It's going to run as a scheduled task, so it can't prompt for path and
filename.

Thanks!

Emil




MS Sql Server LazyDBA home page