0

I have around 50 select statements, some with different column names, that I would really like to automate using SSIS. I'm still fairly a beginner with using SSIS. My normal process is to navigate to the correct database, set SSMS to "results to text" then run the select queries all at once. The output on SSMS is the perfect format because in between the "Select" statements I also have "Print" statements to direct the user what to do next. I have tried using "union all", but it doesn't return the "print" statements which is really important. Ideally, I want all the results to append after the next result in the csv file to keep them all in one place instead of having the package generate 50 different csv files. The select statements don't normally return over 10 rows so it will still be fairly readable if appended. Is this possible at all? The ideal format: enter image description here

1
  • My first take will be using BCP for this. As there are no other system involved(oracle /files)and only to export files to csv with already existing SELECT statements. Read more about exporting here
    – Biju jose
    Apr 6 at 19:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.