I found this answer using xp_cmdshell
SQL Server Agent Job - Export results to Tab Delimited File?
That would work fine for me except I need to provide a date parameter to a sql query. The date param gets populated via another sql query. Was thinking about using powershell.
Is there someone who has worked with this scenario and is willing to share scripts + experiences?
I could write console app in C# (or a class that is invoked via power shell once I work out how that is done). Just after the simplest, most clutter free way forward.
btw: my last use of xp_cmdshell was mired by permissioning frustrations. Last time I had to teach a sys admin how to do it via email + also troubleshoot their lockdown setup via email in a different timezone. As a result I've got some inbuilt hesitancy ;-). Thankfully I've got free reign in this situation though.