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?
2 Answers 2
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.
-
Ah, I see. So there is no tool here that can export data into readable formate like excel or csv?Shashi– Shashi2012年07月13日 17:42:27 +00:00Commented 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 exportEric Higgins– Eric Higgins2012年07月13日 18:28:01 +00:00Commented Jul 13, 2012 at 18:28
-
Cool, I was able to query and than save as csv. Thx friends.Shashi– Shashi2012年07月13日 18:46:07 +00:00Commented Jul 13, 2012 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.