Link to home
Start Free TrialLog in
Avatar of akoIT
akoIT

asked on

Export data from SQL Store Procedure to text comma delimited

Hi Expert,

Please help me export data from my sql to text file with comma delimited format. I have SP that generates the data and i want it from the user interface to download the data and save is as text comma delimited.

Many Thanks.
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

Can you change your stored procedure.
Avatar of Dirk Strauss
The one way to do this is in SQL Server Management Studio (I'm assuming SSMS here). Export query result to .csv file in SQL Server 2008. I am assuming though that you want to do this via code. If so, just write the results of the DataSet to a CSV file: Best way to save DataSet to a CSV file.

An interesting comment on the previous article on StackOverflow was to use FileHelpers.
FileHelpers is a free and easy to use .NET library to import or export data from fixed length or delimited records in files, strings or streams.
.
It's free, why not give that a try?
ASKER CERTIFIED SOLUTION
Avatar of akoIT
akoIT

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I feel that there should be an accepted/assisted solution. The author did not respond to any of the experts.
Avatar of akoIT
akoIT

ASKER

Hi Dirk,

Sorry for I do not have response to any of the expert solution because  there is no assisted solution on the current problem.