• Execute sql tasks do not allow you to export data to a file.

    As stated your running multiple queries in your execute sql task.

    You can select your results and store them in a variable with a type of Object.

    and use a script task to export the file, but this is technical.

    Or you can Create a "Staging" Table in your sql server source. Insert all the data you want to export to this staging table, and then you can use that table as the source for your export. This is a common method for exporting data. Very simple, and the staging table serves as a handy resource for you to validate data and perfrom as many transformations on the data in native sql which is usually faster than doing them in SSIS.

    I usually do a simple select from the source database in a dataflow container, and insert the Target data into a staging table in my ETL database, do any masaging I need with sql tasks, and then export the data in a different dataflow container.