<?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: Can you write a working SQL statement without using any whitespace?</title>
	<atom:link href="http://blog.tanelpoder.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tanelpoder.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/</link>
	<description>Oracle troubleshooting, internals and performance tuning</description>
	<lastBuildDate>Mon, 15 Mar 2010 01:50:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: René Nyffenegger</title>
		<link>http://blog.tanelpoder.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/comment-page-1/#comment-266</link>
		<dc:creator>René Nyffenegger</dc:creator>
		<pubDate>Thu, 17 Jan 2008 21:42:47 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/#comment-266</guid>
		<description>select&#039;abc&#039;from&quot;DUAL&quot;;</description>
		<content:encoded><![CDATA[<p>select&#8217;abc&#8217;from&#8221;DUAL&#8221;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Tkatch</title>
		<link>http://blog.tanelpoder.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/comment-page-1/#comment-261</link>
		<dc:creator>Brian Tkatch</dc:creator>
		<pubDate>Tue, 15 Jan 2008 14:39:13 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/#comment-261</guid>
		<description>Tanel, thanx. I did not know they were added in 10g.</description>
		<content:encoded><![CDATA[<p>Tanel, thanx. I did not know they were added in 10g.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blog &#187; Blog Archive &#187; Oracle, white spaces and unexpected behaviour</title>
		<link>http://blog.tanelpoder.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/comment-page-1/#comment-263</link>
		<dc:creator>Blog &#187; Blog Archive &#187; Oracle, white spaces and unexpected behaviour</dc:creator>
		<pubDate>Tue, 15 Jan 2008 11:47:42 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/#comment-263</guid>
		<description>[...] and Tom Kyte&#8217;s answer with a short explanation. Tanel Poder wrote a blog entry &#8220;Can you write a working SQL statement without using any whitespace?&#8221; [...]</description>
		<content:encoded><![CDATA[<p>[...] and Tom Kyte&#8217;s answer with a short explanation. Tanel Poder wrote a blog entry &#8220;Can you write a working SQL statement without using any whitespace?&#8221; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tanelp</title>
		<link>http://blog.tanelpoder.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/comment-page-1/#comment-262</link>
		<dc:creator>tanelp</dc:creator>
		<pubDate>Tue, 15 Jan 2008 09:29:36 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/#comment-262</guid>
		<description>It makes sense as the BINARY_FLOAT and BINARY_DOUBLE datatypes (what the &quot;F&quot; and &quot;D&quot; stand for) were introduced in 10g!</description>
		<content:encoded><![CDATA[<p>It makes sense as the BINARY_FLOAT and BINARY_DOUBLE datatypes (what the &#8220;F&#8221; and &#8220;D&#8221; stand for) were introduced in 10g!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Tkatch</title>
		<link>http://blog.tanelpoder.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/comment-page-1/#comment-265</link>
		<dc:creator>Brian Tkatch</dc:creator>
		<pubDate>Mon, 14 Jan 2008 14:40:01 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/#comment-265</guid>
		<description>There seems to be a difference in version. I tried this using SQL Plus 10.2.0.1.0, but with two version of Oracle:

Oracle 10XE 10.2.0.1.0

SQL&gt; select 1. from dual;

        1.
----------
         1

SQL&gt; select*from&quot;DUAL&quot;;

D
-
X

SQL&gt; select&quot;DUMMY&quot;from&quot;DUAL&quot;;

D
-
X

SQL&gt; select/**/DUMMY/**/from/**/DUAL;

D
-
X

SQL&gt; select 1.dummy from dual;

      UMMY
----------
  1.0E+000

SQL&gt; select 1a from dual;

         A
----------
         1

SQL&gt; select 1d from dual;

        1D
----------
  1.0E+000

SQL&gt; select 1f from dual;

        1F
----------
  1.0E+000

SQL&gt; select 1from dual;
select 1from dual
             *
ERROR at line 1:
ORA-00923: FROM keyword not found where expected


SQL&gt; select 1ffrom dual;

        1F
----------
  1.0E+000

Oracle 9iEE 9.2.0.8.0

SQL&gt; select 1. from dual;

        1.
----------
         1

SQL&gt; select*from&quot;DUAL&quot;;

D
-
X

SQL&gt; select&quot;DUMMY&quot;from&quot;DUAL&quot;;

D
-
X

SQL&gt; select/**/DUMMY/**/from/**/DUAL;

D
-
X

SQL&gt; select 1.dummy from dual;

     DUMMY
----------
         1

SQL&gt; select 1a from dual;

         A
----------
         1

SQL&gt; select 1d from dual;

         D
----------
         1

SQL&gt; select 1f from dual;

         F
----------
         1

SQL&gt; select 1from dual;

         1
----------
         1

SQL&gt; select 1ffrom dual;
select 1ffrom dual
              *
ERROR at line 1:
ORA-00923: FROM keyword not found where expected

So, this seems that the behavior changed between 9i and 10, in that 10 treat the &quot;d&quot; and &quot;f&quot; as special identifiers. The final line for 9i is also interesting.

I also though maybe the &quot;D&quot; was special because it was the first letter in &quot;DUMMY&quot;, and &quot;F&quot; the first in &quot;FROM&quot;:

10:

SQL&gt; CREATE TABLE A(A INT);

Table created.

SQL&gt; SELECT 1D FROM A;

no rows selected

SQL&gt; INSERT INTO A VALUES(2);

1 row created.

SQL&gt; SELECT 1D FROM A;

        1D
----------
  1.0E+000

SQL&gt; SELECT 1A FROM A;

         A
----------
         1

9:

SQL&gt; CREATE TABLE A(A INT);

Table created.

SQL&gt; SELECT 1D FROM A;

no rows selected

SQL&gt; INSERT INTO A VALUES(2);

1 row created.

SQL&gt;  SELECT 1D FROM A;

         D
----------
         1

SQL&gt; SELECT 1A FROM A;

         A
----------
         1

So, that&#039;s not it.</description>
		<content:encoded><![CDATA[<p>There seems to be a difference in version. I tried this using SQL Plus 10.2.0.1.0, but with two version of Oracle:</p>
<p>Oracle 10XE 10.2.0.1.0</p>
<p>SQL&gt; select 1. from dual;</p>
<p>        1.<br />
&#8212;&#8212;&#8212;-<br />
         1</p>
<p>SQL&gt; select*from&#8221;DUAL&#8221;;</p>
<p>D<br />
-<br />
X</p>
<p>SQL&gt; select&#8221;DUMMY&#8221;from&#8221;DUAL&#8221;;</p>
<p>D<br />
-<br />
X</p>
<p>SQL&gt; select/**/DUMMY/**/from/**/DUAL;</p>
<p>D<br />
-<br />
X</p>
<p>SQL&gt; select 1.dummy from dual;</p>
<p>      UMMY<br />
&#8212;&#8212;&#8212;-<br />
  1.0E+000</p>
<p>SQL&gt; select 1a from dual;</p>
<p>         A<br />
&#8212;&#8212;&#8212;-<br />
         1</p>
<p>SQL&gt; select 1d from dual;</p>
<p>        1D<br />
&#8212;&#8212;&#8212;-<br />
  1.0E+000</p>
<p>SQL&gt; select 1f from dual;</p>
<p>        1F<br />
&#8212;&#8212;&#8212;-<br />
  1.0E+000</p>
<p>SQL&gt; select 1from dual;<br />
select 1from dual<br />
             *<br />
ERROR at line 1:<br />
ORA-00923: FROM keyword not found where expected</p>
<p>SQL&gt; select 1ffrom dual;</p>
<p>        1F<br />
&#8212;&#8212;&#8212;-<br />
  1.0E+000</p>
<p>Oracle 9iEE 9.2.0.8.0</p>
<p>SQL&gt; select 1. from dual;</p>
<p>        1.<br />
&#8212;&#8212;&#8212;-<br />
         1</p>
<p>SQL&gt; select*from&#8221;DUAL&#8221;;</p>
<p>D<br />
-<br />
X</p>
<p>SQL&gt; select&#8221;DUMMY&#8221;from&#8221;DUAL&#8221;;</p>
<p>D<br />
-<br />
X</p>
<p>SQL&gt; select/**/DUMMY/**/from/**/DUAL;</p>
<p>D<br />
-<br />
X</p>
<p>SQL&gt; select 1.dummy from dual;</p>
<p>     DUMMY<br />
&#8212;&#8212;&#8212;-<br />
         1</p>
<p>SQL&gt; select 1a from dual;</p>
<p>         A<br />
&#8212;&#8212;&#8212;-<br />
         1</p>
<p>SQL&gt; select 1d from dual;</p>
<p>         D<br />
&#8212;&#8212;&#8212;-<br />
         1</p>
<p>SQL&gt; select 1f from dual;</p>
<p>         F<br />
&#8212;&#8212;&#8212;-<br />
         1</p>
<p>SQL&gt; select 1from dual;</p>
<p>         1<br />
&#8212;&#8212;&#8212;-<br />
         1</p>
<p>SQL&gt; select 1ffrom dual;<br />
select 1ffrom dual<br />
              *<br />
ERROR at line 1:<br />
ORA-00923: FROM keyword not found where expected</p>
<p>So, this seems that the behavior changed between 9i and 10, in that 10 treat the &#8220;d&#8221; and &#8220;f&#8221; as special identifiers. The final line for 9i is also interesting.</p>
<p>I also though maybe the &#8220;D&#8221; was special because it was the first letter in &#8220;DUMMY&#8221;, and &#8220;F&#8221; the first in &#8220;FROM&#8221;:</p>
<p>10:</p>
<p>SQL&gt; CREATE TABLE A(A INT);</p>
<p>Table created.</p>
<p>SQL&gt; SELECT 1D FROM A;</p>
<p>no rows selected</p>
<p>SQL&gt; INSERT INTO A VALUES(2);</p>
<p>1 row created.</p>
<p>SQL&gt; SELECT 1D FROM A;</p>
<p>        1D<br />
&#8212;&#8212;&#8212;-<br />
  1.0E+000</p>
<p>SQL&gt; SELECT 1A FROM A;</p>
<p>         A<br />
&#8212;&#8212;&#8212;-<br />
         1</p>
<p>9:</p>
<p>SQL&gt; CREATE TABLE A(A INT);</p>
<p>Table created.</p>
<p>SQL&gt; SELECT 1D FROM A;</p>
<p>no rows selected</p>
<p>SQL&gt; INSERT INTO A VALUES(2);</p>
<p>1 row created.</p>
<p>SQL&gt;  SELECT 1D FROM A;</p>
<p>         D<br />
&#8212;&#8212;&#8212;-<br />
         1</p>
<p>SQL&gt; SELECT 1A FROM A;</p>
<p>         A<br />
&#8212;&#8212;&#8212;-<br />
         1</p>
<p>So, that&#8217;s not it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chris neumueller</title>
		<link>http://blog.tanelpoder.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/comment-page-1/#comment-264</link>
		<dc:creator>chris neumueller</dc:creator>
		<pubDate>Mon, 14 Jan 2008 12:36:56 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/#comment-264</guid>
		<description>Hi, here&#039;s the &quot;dummy&quot; chris again.

Good analysis, I assumed it had something to do with number types but didn&#039;t investigate further.

Btw, here&#039;s another gem, which confirms my view that such a &quot;relaxed&quot; parser is no good idea at all:

SQL&gt; select 1from dual;
SQL&gt; select 1ffrom dual;</description>
		<content:encoded><![CDATA[<p>Hi, here&#8217;s the &#8220;dummy&#8221; chris again.</p>
<p>Good analysis, I assumed it had something to do with number types but didn&#8217;t investigate further.</p>
<p>Btw, here&#8217;s another gem, which confirms my view that such a &#8220;relaxed&#8221; parser is no good idea at all:</p>
<p>SQL&gt; select 1from dual;<br />
SQL&gt; select 1ffrom dual;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Antognini</title>
		<link>http://blog.tanelpoder.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/comment-page-1/#comment-260</link>
		<dc:creator>Chris Antognini</dc:creator>
		<pubDate>Mon, 14 Jan 2008 10:02:21 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/#comment-260</guid>
		<description>&gt; What about the “D” and “F” notation in literal values - is that specified in ANSI too?

I was not able to find information about that.</description>
		<content:encoded><![CDATA[<p>&gt; What about the “D” and “F” notation in literal values &#8211; is that specified in ANSI too?</p>
<p>I was not able to find information about that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tanelp</title>
		<link>http://blog.tanelpoder.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/comment-page-1/#comment-259</link>
		<dc:creator>tanelp</dc:creator>
		<pubDate>Mon, 14 Jan 2008 09:19:09 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/#comment-259</guid>
		<description>Chris A: Yep I noticed :)

I quickly skimmed through the standard too (the BNF notation) and didn&#039;t see anything which would enforce use of whitespace.

So, it may be that Oracle&#039;s just following the standard on this.. (What about the &quot;D&quot; and &quot;F&quot; notation in literal values - is that specified in ANSI too?)

Anyway, after seeing a case where a NUMBER column DUMMY is silently converted to a BINARY_DOUBLE column UMMY I think there should be a safeguard against this issue. For example parser erroring out with &quot;ORA-xyz: ambiguous expression or literal value&quot; or something like that...</description>
		<content:encoded><![CDATA[<p>Chris A: Yep I noticed :)</p>
<p>I quickly skimmed through the standard too (the BNF notation) and didn&#8217;t see anything which would enforce use of whitespace.</p>
<p>So, it may be that Oracle&#8217;s just following the standard on this.. (What about the &#8220;D&#8221; and &#8220;F&#8221; notation in literal values &#8211; is that specified in ANSI too?)</p>
<p>Anyway, after seeing a case where a NUMBER column DUMMY is silently converted to a BINARY_DOUBLE column UMMY I think there should be a safeguard against this issue. For example parser erroring out with &#8220;ORA-xyz: ambiguous expression or literal value&#8221; or something like that&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Antognini</title>
		<link>http://blog.tanelpoder.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/comment-page-1/#comment-258</link>
		<dc:creator>Chris Antognini</dc:creator>
		<pubDate>Mon, 14 Jan 2008 08:53:17 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/#comment-258</guid>
		<description>Just to avoid confusion... I&#039;m not the Chris that posted the first comment...

I agree that the last test you posted in the comment is quite &quot;interesting&quot;.</description>
		<content:encoded><![CDATA[<p>Just to avoid confusion&#8230; I&#8217;m not the Chris that posted the first comment&#8230;</p>
<p>I agree that the last test you posted in the comment is quite &#8220;interesting&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tanelp</title>
		<link>http://blog.tanelpoder.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/comment-page-1/#comment-268</link>
		<dc:creator>tanelp</dc:creator>
		<pubDate>Mon, 14 Jan 2008 08:44:05 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/01/14/can-you-write-a-working-sql-statement-without-using-any-whitespace/#comment-268</guid>
		<description>Hi Chris,

I narrowed down the issue further, the &quot;.&quot; is not needed either, Oracle &quot;recognizes&quot; the next token when character class changes from a digit to letter.

&lt;code&gt;SQL&gt; select 1a from dual;

         A
----------
         1

&lt;/code&gt;

However the &quot;d&quot; and &quot;f&quot; letters are special (and belong to number character class in literal parser) as they indicate binary_Double and binary_Float datatypes in the literal text:

&lt;code&gt;SQL&gt; select 1d from dual;

        1D
----------
  1.0E+000

SQL&gt; select 1f from dual;

        1F
----------
  1.0E+000

&lt;/code&gt;

Therefore:

SQL&gt; create table t as select 1dummy from dual;

Table created.

&lt;code&gt;SQL&gt; desc t
           Name                            Null?    Type
           ------------------------------- -------- --------------
    1      UMMY                                     BINARY_DOUBLE


&lt;/code&gt;

Yes, this is getting weird, so I will downgrade my opinion on this from &quot;flexibility&quot; to a &quot;feature&quot; which should be fixed in order to alert users who happen to do typos or use wrong syntax like this...</description>
		<content:encoded><![CDATA[<p>Hi Chris,</p>
<p>I narrowed down the issue further, the &#8220;.&#8221; is not needed either, Oracle &#8220;recognizes&#8221; the next token when character class changes from a digit to letter.</p>
<p><code>SQL&gt; select 1a from dual;</p>
<p>         A<br />
----------<br />
         1</p>
<p></code></p>
<p>However the &#8220;d&#8221; and &#8220;f&#8221; letters are special (and belong to number character class in literal parser) as they indicate binary_Double and binary_Float datatypes in the literal text:</p>
<p><code>SQL&gt; select 1d from dual;</p>
<p>        1D<br />
----------<br />
  1.0E+000</p>
<p>SQL&gt; select 1f from dual;</p>
<p>        1F<br />
----------<br />
  1.0E+000</p>
<p></code></p>
<p>Therefore:</p>
<p>SQL&gt; create table t as select 1dummy from dual;</p>
<p>Table created.</p>
<p><code>SQL&gt; desc t<br />
           Name                            Null?    Type<br />
           ------------------------------- -------- --------------<br />
    1      UMMY                                     BINARY_DOUBLE</p>
<p></code></p>
<p>Yes, this is getting weird, so I will downgrade my opinion on this from &#8220;flexibility&#8221; to a &#8220;feature&#8221; which should be fixed in order to alert users who happen to do typos or use wrong syntax like this&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
