<?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>IONCANNON &#187; sql</title>
	<atom:link href="http://www.ioncannon.net/tag/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ioncannon.net</link>
	<description>Thoughts on Software Development and Engineering</description>
	<lastBuildDate>Tue, 03 Jan 2012 13:59:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<atom:link rel='hub' href='http://www.ioncannon.net/?pushpress=hub'/>
		<item>
		<title>How to get the next date for a weekday using Oracle</title>
		<link>http://www.ioncannon.net/database-administration/93/how-to-get-the-next-date-for-a-weekday-using-oracle/</link>
		<comments>http://www.ioncannon.net/database-administration/93/how-to-get-the-next-date-for-a-weekday-using-oracle/#comments</comments>
		<pubDate>Wed, 02 Aug 2006 19:26:57 +0000</pubDate>
		<dc:creator>carson</dc:creator>
				<category><![CDATA[database administration]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.ioncannon.net/oracle/93/how-to-get-the-next-date-for-a-weekday-using-oracle/</guid>
		<description><![CDATA[If you ever need to find the next weekday from a given date in Oracle it turns out they have a built in function for doing just that. If you want the next Sunday from yesterday you would do: Valid entries for the day are: SUN, MON, TUE, WED, THU, FRI, and SAT Tags: Oracle, [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever need to find the next weekday from a given date in Oracle it turns out they have a built in function for doing just that. If you want the next Sunday from yesterday you would do:</p>
<div class="codesnip-container" >
<div class="sql codesnip" style="font-family:monospace;"><span class="kw1">SELECT</span> NEXT_DAY<span class="br0">&#40;</span>SYSDATE <span class="sy0">-</span> <span class="nu0">1</span><span class="sy0">,</span> <span class="st0">&#039;SUN&#039;</span><span class="br0">&#41;</span> <span class="kw1">FROM</span> dual;</div>
</div>
<p>Valid entries for the day are: SUN, MON, TUE, WED, THU, FRI, and SAT</p>
<p>Tags: <a href="http://technorati.com/tag/Oracle" rel="tag">Oracle</a>, <a href="http://technorati.com/tag/SQL" rel="tag"> SQL</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ioncannon.net/database-administration/93/how-to-get-the-next-date-for-a-weekday-using-oracle/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SQL Beautifier</title>
		<link>http://www.ioncannon.net/database-administration/67/sql-beautifier/</link>
		<comments>http://www.ioncannon.net/database-administration/67/sql-beautifier/#comments</comments>
		<pubDate>Thu, 06 Jul 2006 17:35:24 +0000</pubDate>
		<dc:creator>carson</dc:creator>
				<category><![CDATA[database administration]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.ioncannon.net/oracle/67/sql-beautifier/</guid>
		<description><![CDATA[I pulled a large amount of SQL out of some existing code and wanted to have it formated nicely for me. I figured there had to be some type of pretty printer for SQL available outside of applications like TOAD. I have access to TOAD but it would have required a reboot so I figured [...]]]></description>
			<content:encoded><![CDATA[<p>I pulled a large amount of SQL out of some existing code and wanted to have it formated nicely for me. I figured there had to be some type of pretty printer for SQL available outside of applications like TOAD. I have access to TOAD but it would have required a reboot so I figured I would ask google what to do. There seem to be a number of different formaters out there. I found a couple people talking about current options <a href="http://awads.net/wp/2005/12/12/format-your-sql-the-easy-way/">a list here</a> and <a href="http://blogs.ittoolbox.com/database/solutions/archives/free-sql-code-beautifier-3240">here</a>.  The following list is a summary of the options I found:</p>
<ul>
<li><a href="http://www.sqlinform.com/">SQLInform</a></li>
<li><a href="http://www.wangz.net/cgi-bin/pp/gsqlparser/sqlpp/sqlformat.tpl">Online SQL Formatter</>a</li>
<li><a href="http://www.dbainfopower.com/dbaip_SQLreview.php">SQL Review</>a</li>
<li><a href="http://psti.equinoxbase.com/">Pl/Sql tidy</a></li>
<li><a href="http://vsbabu.org/software/lsqlb.html">Make your own with C</a></li>
<li>Use TOAD</li>
</ul>
<p>I decided that since SQLInform was mentioned a lot I would give it a try. I was suprised at how well it did. I gave it a huge amount of SQL to re-format and it gave it back to me formated. There is a limit on how much you can ask it to format at once but that shouldn&#039;t be a big issue. I didn&#039;t see that it choked on anything that I gave it and there were all kinds of nasty things going on in the SQL.</p>
<p>One interesting thing to come from this is that it seems there are no open source or truely free unix based formaters out there. It seems like it would be easy enough to get going since the SQL grammar is available for a number of different parser generators.</p>
<p>Tags: <a href="http://technorati.com/tag/SQL" rel="tag">SQL</a>, <a href="http://technorati.com/tag/TOAD" rel="tag"> TOAD</a>, <a href="http://technorati.com/tag/SQLInform" rel="tag"> SQLInform</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ioncannon.net/database-administration/67/sql-beautifier/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

