 




<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>IT Answers &#187; OPENROWSET</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/tag/openrowset/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers</link>
	<description></description>
	<lastBuildDate>Mon, 20 May 2013 15:05:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Outputting results of SQL SELECT statements into a spreadsheet</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/outputting-results-of-sql-select-statements-into-a-spreadsheet/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/outputting-results-of-sql-select-statements-into-a-spreadsheet/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 20:54:56 +0000</pubDate>
		<dc:creator>SQL Server Ask the Experts</dc:creator>
				<category><![CDATA[OPENROWSET]]></category>
		<category><![CDATA[SELECT statement]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Query]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I am using OPENROWSET to output the result of a number of SQL SELECT statements into a spreadsheet. It works for most of the SELECT statements, but there are 4 random queries out of 82 that take more than an hour to execute. This is the code: insert into OPENROWSET(&#8216;Microsoft.Jet.OLEDB.4.0&#8242;, &#8216;Excel 8.0;Database=D:MGTempESWIConvAuditQueriescnvWriteOff.xls;&#8217;, &#8216;SELECT Phone, Member, [...]]]></description>
				<content:encoded><![CDATA[<p>I am using OPENROWSET to output the result of a number of SQL SELECT statements into a spreadsheet. It works for most of the SELECT statements, but there are 4 random queries out of 82 that take more than an hour to execute. This is the code:</p>
<p>        insert into OPENROWSET(&#8216;Microsoft.Jet.OLEDB.4.0&#8242;,<br />
        &#8216;Excel 8.0;Database=D:MGTempESWIConvAuditQueriescnvWriteOff.xls;&#8217;,<br />
        &#8216;SELECT Phone, Member, FullName, TransAmount, TransType, WOAmount, WOCode, WODate FROM &#91;PhoneMemberNotInSerord$&#93;&#8217;)<br />
        select Phone, Member, FullName, TransAmount, TransType, WOAmount, WOCode, WODate from cnvWriteOff_SWI a<br />
        where not exists (select * from cnvSerord_SWI b<br />
                                                where a.Phone = b.Phone<br />
                                                and a.Member = b.Member)</p>
<p> Any thoughts?</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/outputting-results-of-sql-select-statements-into-a-spreadsheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/12 queries in 0.018 seconds using memcached
Object Caching 321/330 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-20 17:04:02 -->