I have a stored procedure which returns a table output with 30 columns and around 200k records. Baseline of stored procedure: uses 4 temp tables within the procedure.
I need to take this output and put it into a CSV file. I tried using SSIS, but there seems to be a problem with SSIS having to execute stored procedure which uses TEMP tables. So now I am back to dealing with stored procedure output again.
In a nutshell:
- Need output of stored procedure in a CSV, have to automate it for daily reports
- Tried using SSIS, but SSIS not able to execute stored procedure using TEMP tables
- How can I get stored procedure to give a CSV output with out using BCP/sqlcmd
EDIT:
I apologize it is definitely Possible through SSIS. Worked for me using the Set FMTONLY ON/Off feature. Please follow this link: Follow this Link to Get Three ways to do this using SSIS
I am specifically trying to use only a Stored Procedure to achieve this. So another question adds up to this:
Can I using only a stored procedure upload the output which is a CSV file to a SharePoint site.
EDIT 2:
Can I using only a stored procedure get the output in a CSV file. If anyone can suggest me this part, it would be helpful