WILLIAM MITCHELL wrote:
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.
Problems are opportunities brilliantly disguised as insurmountable obstacles.
How to post questions to get better answers faster[/url]
Managing Transaction Logs[/url]