Sunday, February 19, 2012

Export tables to csv file

Hi...

I have 4 connected table in sql, and i have view that query this 4 and create 1 table, can i export that to csv file?

thank you...

Once you have the SELECT written, export is quit easy. See http://www.codeproject.com/aspnet/Excel_CSV_export_button.asp An extended ASP.NET button control for exporting/downloading Excel or CSV file.

|||

Yes, you can!

How? By using DTS in SQL Server 2000 or SSIS in SQL Server 2005.

Justright click on the database and select "Tasks" then "Export".

Decide yoursource (your sql server andyour databasethat you are working on) then decide about yourdestination selectFlat File Destination from the drop down menu.

Click onBrowse, select your destination .cvs file.

Tip: You maycheck the box tomake table's columns in the first line of the .cvs file.

Select theFormat: (for example: Delimited)

Select theText Qualifier: (for example " or ' depends on your case).

Click onNext.

Now you can either to get dump thefull data in the table into the .cvs fileby selecting thefirst option,

OR

you may getpart of the data and dumpt it into the .cvs file by selecting thesecond option.

Click onNext.

Specify thesource Table OR View from the drop down menu. (usually you don't need to change the values of the others two drop down menues).

Click onNext, thenFinished.

We areDONE! Cool

I hope this steps will solve the issue.

Regards,
CS4Ever

-------------

If you find this post useful & helpful, please click on "Make as Answer" button.

No comments:

Post a Comment