Exporting data from a SQL2005 stored procedure to CSV

I want to find a way to allow our reporting guy to export the data returned from the stored procedure to a CSV file. The procedure will need the (date) parameter passed to it.

Is there a data export wizard that I can use for it, or some other convenient way in SQL2005 that it can generate a CSV (after providing some parameters).

The data doesn't need to come from a stored procedure, it could be a view or something, but it should be able to easily provide some predefined constraints when creating the CSV file.

Thanks for any help you guys can offer.

0


source to share


3 answers


Depending on what tools you are looking for, just give it SQL Server Management Studio. It can then execute the stored procedure and save the results in CSV format. This is your most elegant way to do it dynamically.



Otherwise, you might want to look at generating an SSIS package if the values ​​don't change frequently.

+2


source


Take a look at SQL Server Reporting Services. You can export report results to Excel.



0


source


I would install a small web app with multiple filter options and a button to export to excel.

This will remove any dependency on the SQL Server capabilities of your reports.

0


source







All Articles