I'm trying to automate a SQL query that needs to run on multiple databases. The query is generally run at the beginning of the week manually, ran for each individual database, and then exported to a CSV.
I need to find a simple way to have this query ran and have the result set exported to a CSV for me.