Skip to content
Advertisement

How to send a query result in CSV format?

I am working on ETL and I have this below sql code in my SQL Task in SSIS package. This is how i have coded. I am selecting a data from a table and result of that query as file. I want this attachment sent in CSV format. How do i do it?

Any help will be very appreciated. Thanks in advance.

Advertisement

Answer

Adding @query_result_separator should do the trick.

Adding @query_result_no_padding = 1 might clean up the results a bit. All off the arguments can be found here

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement