Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am basically LAMP developer got some assignment where SQL Server is required. I have installed SQL Server 2008 R2 Express and imported backup file in it.

Now, I want to export user table in excel or csv but not able to do that.

Can anyone tell me how can I export table?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

You'll want to look at using SQL Server Integration Services.

If you want to export a small amount of data, you can also SELECT the data in SQL Server Management Studio, and highlight / copy / paste it into Excel, or rt click save as.

share|improve this answer
    
Ah, I see. So there is no tool here that can export data into readable formate like excel or csv? –  Shashi Jul 13 '12 at 17:42
    
You can do results to file which creates an .rpt file. Seems like I've seen add-ons to spit it out as Excel in the past. You can check this also: simple-talk.com/sql/database-administration/… Or try the wizard: msdn.microsoft.com/en-us/library/ms140052.aspx Also can rt click on your SSMS results and do save to file. That might be easiest if it's a one time export –  Eric Higgins Jul 13 '12 at 18:28
    
Cool, I was able to query and than save as csv. Thx friends. –  Shashi Jul 13 '12 at 18:46

If you are looking for a command-line tool to do something like this, then try BCP. It's a bulk Import/Export command-line utility that comes with SQL Server. It is somewhat limited in it's formatting options, but it can usually do the simpler forms of CSV, etc.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.