Check out this blog post from Luca Zavarelli on how to do it from PowerShell: https://towardsdatascience.com/extracting-data-from-azure-sql-server-huge-tables-in-rfc-4180-compliant-csv-files-1cb09a7a0883
Might be less heavy artillery than SSIS.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I need to store Sql query result to csv file in a given path.
I need to this task in SQL Agent.
Check out this blog post from Luca Zavarelli on how to do it from PowerShell: https://towardsdatascience.com/extracting-data-from-azure-sql-server-huge-tables-in-rfc-4180-compliant-csv-files-1cb09a7a0883
Might be less heavy artillery than SSIS.
Check it out here: https://analytics4all.org/2018/03/10/ssis-lesson-1-export-to-csv/
In addition to the above two answers, you can also refer to this link. There are a lot of targeted methods inside.
https://stackoverflow.com/questions/3169220/export-query-result-to-csv-file-in-sql-server-2008
Best regards,
Percy Tang
If the answer is the right solution, please click "Accept Answer". If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.