<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Spool a CSV file from Oracle/ SQL*Plus without quotes</title>
	<atom:link href="http://luckylarry.co.uk/2009/07/spool-a-csv-file-from-oracle-sqlplus-without-quotes/feed/" rel="self" type="application/rss+xml" />
	<link>http://luckylarry.co.uk/2009/07/spool-a-csv-file-from-oracle-sqlplus-without-quotes/</link>
	<description>Whats in my head...</description>
	<lastBuildDate>Fri, 19 Mar 2010 09:32:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: larry</title>
		<link>http://luckylarry.co.uk/2009/07/spool-a-csv-file-from-oracle-sqlplus-without-quotes/comment-page-1/#comment-941</link>
		<dc:creator>larry</dc:creator>
		<pubDate>Tue, 03 Nov 2009 23:14:18 +0000</pubDate>
		<guid isPermaLink="false">http://luckylarry.co.uk/?p=236#comment-941</guid>
		<description>Glad it helped! :)</description>
		<content:encoded><![CDATA[<p>Glad it helped! <img src='http://luckylarry.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zAo</title>
		<link>http://luckylarry.co.uk/2009/07/spool-a-csv-file-from-oracle-sqlplus-without-quotes/comment-page-1/#comment-939</link>
		<dc:creator>zAo</dc:creator>
		<pubDate>Tue, 03 Nov 2009 13:15:27 +0000</pubDate>
		<guid isPermaLink="false">http://luckylarry.co.uk/?p=236#comment-939</guid>
		<description>Thanks! This is helpfull.</description>
		<content:encoded><![CDATA[<p>Thanks! This is helpfull.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: larry</title>
		<link>http://luckylarry.co.uk/2009/07/spool-a-csv-file-from-oracle-sqlplus-without-quotes/comment-page-1/#comment-787</link>
		<dc:creator>larry</dc:creator>
		<pubDate>Tue, 22 Sep 2009 17:34:19 +0000</pubDate>
		<guid isPermaLink="false">http://luckylarry.co.uk/?p=236#comment-787</guid>
		<description>Thanks James. Glad it helped you out and it&#039;s not just me! :) 

Interesting thing about the escape line and a good spot. I&#039;m going to add that in on all my variables although I&#039;ve not had the issue yet, but then I wouldn&#039;t like to have the problem either.</description>
		<content:encoded><![CDATA[<p>Thanks James. Glad it helped you out and it&#8217;s not just me! <img src='http://luckylarry.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>Interesting thing about the escape line and a good spot. I&#8217;m going to add that in on all my variables although I&#8217;ve not had the issue yet, but then I wouldn&#8217;t like to have the problem either.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://luckylarry.co.uk/2009/07/spool-a-csv-file-from-oracle-sqlplus-without-quotes/comment-page-1/#comment-786</link>
		<dc:creator>James</dc:creator>
		<pubDate>Tue, 22 Sep 2009 16:47:04 +0000</pubDate>
		<guid isPermaLink="false">http://luckylarry.co.uk/?p=236#comment-786</guid>
		<description>Nice post - proved very helpful for a report I needed to create.  Thanks!  Just something to add on your filename tip that I pulled from another source.  If you have the variable at the end of the filename (myFile_&amp;mydate.csv), you can end up with an odd name (myFile_&amp;mydate.csv.LST).  Something about SQL Plus not knowing where the variable ends.  To fix this, you need to include an escape character at the end of the variable name.  
&lt;code&gt;
set escape /
SET linesize 160;

COLUMN dcol new_value mydate noprint
SELECT to_char(sysdate,&#039;YYYYMMDD&#039;) dcol FROM dual;
spool c:\temp\myFile_&amp;mydate/.csv
set escape off;

SELECT &#039;Field1Name,Field2Name,Field3Name,Field4Name,Field5Name&#039; FROM dual;
&lt;/code&gt;

Any character works for the escape that you aren&#039;t using between where you set the escape and set it off.  The slash worked for me, but I had to set escape off after the spool command as I was using it in my query.

Thanks again!</description>
		<content:encoded><![CDATA[<p>Nice post &#8211; proved very helpful for a report I needed to create.  Thanks!  Just something to add on your filename tip that I pulled from another source.  If you have the variable at the end of the filename (myFile_&amp;mydate.csv), you can end up with an odd name (myFile_&amp;mydate.csv.LST).  Something about SQL Plus not knowing where the variable ends.  To fix this, you need to include an escape character at the end of the variable name.<br />
<code><br />
set escape /<br />
SET linesize 160;</p>
<p>COLUMN dcol new_value mydate noprint<br />
SELECT to_char(sysdate,'YYYYMMDD') dcol FROM dual;<br />
spool c:\temp\myFile_&amp;mydate/.csv<br />
set escape off;</p>
<p>SELECT 'Field1Name,Field2Name,Field3Name,Field4Name,Field5Name' FROM dual;<br />
</code></p>
<p>Any character works for the escape that you aren&#8217;t using between where you set the escape and set it off.  The slash worked for me, but I had to set escape off after the spool command as I was using it in my query.</p>
<p>Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Join columns/ concatenate strings in Oracle PLSQL/ MySQL &#124; Lucky Larry</title>
		<link>http://luckylarry.co.uk/2009/07/spool-a-csv-file-from-oracle-sqlplus-without-quotes/comment-page-1/#comment-323</link>
		<dc:creator>Join columns/ concatenate strings in Oracle PLSQL/ MySQL &#124; Lucky Larry</dc:creator>
		<pubDate>Fri, 07 Aug 2009 13:52:29 +0000</pubDate>
		<guid isPermaLink="false">http://luckylarry.co.uk/?p=236#comment-323</guid>
		<description>[...] Spool a CSV file from Oracle/ SQL*Plus without quotes   Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages. [...]</description>
		<content:encoded><![CDATA[<p>[...] Spool a CSV file from Oracle/ SQL*Plus without quotes   Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Spool a CSV file from Oracle/ SQL*Plus without quotes &#171; Lucky Larry&#8217;s</title>
		<link>http://luckylarry.co.uk/2009/07/spool-a-csv-file-from-oracle-sqlplus-without-quotes/comment-page-1/#comment-145</link>
		<dc:creator>Spool a CSV file from Oracle/ SQL*Plus without quotes &#171; Lucky Larry&#8217;s</dc:creator>
		<pubDate>Fri, 17 Jul 2009 20:12:05 +0000</pubDate>
		<guid isPermaLink="false">http://luckylarry.co.uk/?p=236#comment-145</guid>
		<description>[...] July 17, 2009 at 8:11 pm (Computers, Oracle, Programming, SQL) (CSV file, No Quotes, Oracle, Spool, SQL, SQL Plus)  Quite useful, I had the case where I needed to provide a CSV file to an external party from our Oracle 10g database. No problem, there are loads of CSV export tools out there. But it then transpired that the CSV’s that I was generating were using quote (”) marks to identify fields e.g. “field1?,”field2? and so on… Spool a CSV file from Oracle/ SQL*Plus without quotes [...]</description>
		<content:encoded><![CDATA[<p>[...] July 17, 2009 at 8:11 pm (Computers, Oracle, Programming, SQL) (CSV file, No Quotes, Oracle, Spool, SQL, SQL Plus)  Quite useful, I had the case where I needed to provide a CSV file to an external party from our Oracle 10g database. No problem, there are loads of CSV export tools out there. But it then transpired that the CSV’s that I was generating were using quote (”) marks to identify fields e.g. “field1?,”field2? and so on… Spool a CSV file from Oracle/ SQL*Plus without quotes [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
