December 23, 2019 at 1:39 pm
The OP stated "I want to make a report to let user export data from SQL Server database" so why not consider SSRS?
December 23, 2019 at 4:24 pm
That's certainly another viable option and it has kind of a user interface built in.
--Jeff Moden
Change is inevitable... Change for the better is not.
December 23, 2019 at 6:18 pm
The OP stated "I want to make a report to let user export data from SQL Server database" so why not consider SSRS?
This also has the benefit of allowing the user to specify parameters and preview the data before exporting to any allowed format. What I find in general is that the users actually want it in Excel format - but that isn't native to SQL Server and we end up using CSV so they can open it in Excel.
SSRS will allow them to ability to export directly to Excel.
You could also utilize sp_send_dbmail - and include the results as an attachment in an email. If you want the users to be able to open that email with Excel - you do have to include in the first column some extra data to identify the file as a delimited file, but it can work well.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
December 23, 2019 at 8:23 pm
If the ultimate use for the CSV file will be to load into an Excel spreadsheet, you can also make a "Refreshable Spreadsheet" that calls a stored procedure to get the data.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 16 through 18 (of 18 total)
You must be logged in to reply to this topic. Login to reply