Solved

Simple MS Sql query tool

Posted on 2010-09-24
8
558 Views
Last Modified: 2012-06-21
Can anyone recommend a simple ms sql query tool to export queries into an excel spreadsheet?
0
Comment
Question by:ptmjdlee
8 Comments
 
LVL 16

Assisted Solution

by:carsRST
carsRST earned 500 total points
Comment Utility
BCP is very easy to use.  You can export to a csv file, which works very nicely in Excel.

It's a free command line tool included with all versions of SQL Server.

http://www.simple-talk.com/sql/database-administration/creating-csv-files-using-bcp-and-stored-procedures/

0
 
LVL 16

Expert Comment

by:carsRST
Comment Utility
Another command line option is SQLCMD.

See below for exporting to CSV.

http://stackoverflow.com/questions/425379/how-to-export-data-as-csv-format-from-sql-server-using-sqlcmd

Note, if you want to export directly to an Excel format, you'll probably need to use SSIS or an openrowset.

0
 
LVL 2

Expert Comment

by:willz123
Comment Utility
using SQL server management studio you can also export the results to csv, just right click one of the column headers in the output window and click "Save Results As..."
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 12

Expert Comment

by:Anuradha Goli
Comment Utility
Exec

sp_configure 'show advanced options', 1
Reconfigure

Exec

sp_configure 'Ad Hoc Distributed Queries',1
Reconfigure

Exec

sp_configure 'OLE Automation Procedures', 1;
Reconfigure

Exec

sp_configure 'Agent XPs', 1;
Reconfigure

Go

Select * From OpenRowSet('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=X\XXX\XXX.xls' , [Sheet1$])
Exec
 
sp_configure 'show advanced options', 1
Reconfigure

Exec

sp_configure 'Ad Hoc Distributed Queries',0
Reconfigure

Exec

sp_configure 'Ole Automation Procedures', 0;
Reconfigure

Go
0
 

Author Comment

by:ptmjdlee
Comment Utility
What I've used in the past has been Embarcaderro or PL/SQL with Oracle dbs. Is there a simple version of these types of software that I can use to extract some data from my ms sql database?
0
 
LVL 16

Accepted Solution

by:
carsRST earned 500 total points
Comment Utility
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
This question has been classified as abandoned and is being closed as part of the Cleanup Program.  See my comment at the end of the question for more details.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now