Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #1828

Re: SELECT output goto Excel or to an SQL View Table

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups comp.databases.ms-sqlserver
Subject Re: SELECT output goto Excel or to an SQL View Table
Date Tue, 28 Oct 2014 11:31:19 +0000 (UTC)
Organization Erland Sommarskog
Lines 20
Message-ID <XnsA3D47F661CYazorman@127.0.0.1> (permalink)
References <5fb36b34-862a-46ba-a31a-26b71ee9f57b@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Injection-Date Tue, 28 Oct 2014 11:31:19 +0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="5d404a5d864426cbf50ddbcd9433a6e4"; logging-data="30435"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19zbGScjKDPCC6gwZcTZPiz"
User-Agent Xnews/2005.10.03 Mime-proxy/1.4.c.4 (Win32)
Cancel-Lock sha1:9O13vbfySHeVKwMxHcj542rqWh4=
Xref csiph.com comp.databases.ms-sqlserver:1828

Show key headers only | View raw


Raul Rego (rrego@pmchnnj.org) writes:
> In SQL Server Manager Studio - 2014 if relevant - can I have the output
> of this statement to Excel or a table view.  How? 

I've seen people to do this with OPENROWSET and a Google search will 
certainly find a number of articles and blog posts.

However, I have also seen many people who had problems with gettings this 
work, and it is brittle. I think it is better to do this from the Excel 
side. That is, run the query from Excel. Or use SQL Integration Services or 
some other client program to populate the Excel file.


-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Find similar


Thread

SELECT output goto Excel or to an SQL View Table Raul Rego <rrego@pmchnnj.org> - 2014-10-28 03:12 -0700
  Re: SELECT output goto Excel or to an SQL View Table Erland Sommarskog <esquel@sommarskog.se> - 2014-10-28 11:31 +0000

csiph-web