Solved

Simple MS Sql query tool

Posted on 2010-09-24
8
564 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 16

Assisted Solution

by:carsRST
carsRST earned 500 total points
ID: 33753333
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
ID: 33753361
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
ID: 33753817
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 12

Expert Comment

by:Anuradha Goli
ID: 33753854
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
ID: 33755256
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
ID: 33755288
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 34299493
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 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