<?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>MemoSoup &#187; batch</title>
	<atom:link href="http://www.memosoup.com/tag/batch/feed" rel="self" type="application/rss+xml" />
	<link>http://www.memosoup.com</link>
	<description>Mix of the things I always forget</description>
	<lastBuildDate>Tue, 07 Feb 2012 00:03:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Start sqlplus in Windows .BAT script</title>
		<link>http://www.memosoup.com/20090825/start-sqlplus-in-windows-bat-script.html</link>
		<comments>http://www.memosoup.com/20090825/start-sqlplus-in-windows-bat-script.html#comments</comments>
		<pubDate>Mon, 24 Aug 2009 22:37:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Windows & DOS]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=19</guid>
		<description><![CDATA[<p>Here is the example of emulating &#8220;HERE-documents&#8221; in Windows shell.</p> @ECHO OFF FIND &#34;/*%none% some_label&#34; &#60;%0 &#124;sqlplus USER/PASS@SERVER GOTO end : ----------- embedded SQL------------------------- /* some_label */ select count(*) from dba_free_space; /* some_label */ select tablespace_name from dba_tablespaces; : ----------- end of embedded SQL------------------------- :end <p>It&#8217;s also possible to use procedures in .bat files. %none% [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the example of emulating <strong>&#8220;HERE-documents&#8221;</strong> in Windows shell.</p>
<div class="codecolorer-container dos default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #33cc33;">@</span><a href="http://www.ss64.com/nt/echo.html"><span style="color: #b1b100; font-weight: bold;">ECHO</span></a> OFF <br />
<br />
FIND &quot;/*<span style="color: #33cc33;">%</span><span style="color: #448888;">none</span><span style="color: #33cc33;">%</span> some_label&quot; <span style="color: #33cc33;">&lt;%</span><span style="color: #448888;">0</span> <span style="color: #33cc33;">|</span>sqlplus USER/PASS<span style="color: #33cc33;">@</span>SERVER <br />
<br />
<a href="http://www.ss64.com/nt/goto.html"><span style="color: #00b100; font-weight: bold;">GOTO</span></a> end <br />
<br />
: <span style="color: #b100b1; font-weight: bold;">-----------</span> embedded SQL------------------------- <br />
<br />
/* some_label */ select count<span style="color: #33cc33;">(</span>*<span style="color: #33cc33;">)</span> from dba_free_space; <br />
/* some_label */ select tablespace_name from dba_tablespaces; <br />
<br />
: <span style="color: #b100b1; font-weight: bold;">-----------</span> end of embedded SQL------------------------- <br />
<br />
:<span style="color: #b100b1; font-weight: bold;">end</span></div></div>
<p>It&#8217;s also possible to use procedures in .bat files.<br />
%none% is replaced by empty string.<br />
Spaces are mandadory in &#8220;/* some_label */&#8221;  string.</p>
<p>Another possibility:</p>
<div class="codecolorer-container dos default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #33cc33;">@(</span><br />
<a href="http://www.ss64.com/nt/echo.html"><span style="color: #b1b100; font-weight: bold;">echo</span></a> select global_name from global_name ;<br />
<span style="color: #33cc33;">)</span> <span style="color: #33cc33;">|</span> sqlplus USER/PASS<span style="color: #33cc33;">@</span>SERVER</div></div>

<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20090825%2Fstart-sqlplus-in-windows-bat-script.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20090825/start-sqlplus-in-windows-bat-script.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="Start sqlplus in Windows .BAT script" data-url="http://www.memosoup.com/20090825/start-sqlplus-in-windows-bat-script.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20090825/start-sqlplus-in-windows-bat-script.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

