Solved

Simple MS Sql query tool

Posted on 2010-09-24
8
561 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
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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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 100

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
tempdb log contention 16 50
MS SQL + Insert Into Table - If Doesnt Exist 9 48
date diff with Fiscal Calendar 4 57
Index and Stats Management-Specific tables 8 23
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

830 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