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. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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:… Or try the wizard: 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


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.