3

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?

Taryn
9,7465 gold badges49 silver badges74 bronze badges
asked Jul 13, 2012 at 17:07

2 Answers 2

4

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.

answered Jul 13, 2012 at 17:39
3
  • Ah, I see. So there is no tool here that can export data into readable formate like excel or csv? Commented Jul 13, 2012 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 Commented Jul 13, 2012 at 18:28
  • Cool, I was able to query and than save as csv. Thx friends. Commented Jul 13, 2012 at 18:46
1

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.

answered Jul 13, 2012 at 18:42

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.