<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Aliases</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2010/01/26/aliases/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2010/01/26/aliases/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Thu, 23 May 2013 12:47:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: ORA-06553: PLS-306: wrong number or types of arguments in call to &#8216;OGC_Y&#8217; while exporting table &#171; Anand&#039;s Blog</title>
		<link>http://jonathanlewis.wordpress.com/2010/01/26/aliases/#comment-47271</link>
		<dc:creator><![CDATA[ORA-06553: PLS-306: wrong number or types of arguments in call to &#8216;OGC_Y&#8217; while exporting table &#171; Anand&#039;s Blog]]></dc:creator>
		<pubDate>Tue, 19 Jun 2012 18:22:35 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2913#comment-47271</guid>
		<description><![CDATA[[...] http://jonathanlewis.wordpress.com/2010/01/26/aliases/ Unfortunately, if you’ve installed Spatial, there are two functions (called ogc_x and ogc_y) which has been given public synonyms X and Y respectively that move Oracle into the function-call validity checks – which is where the pls error comes from. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] <a href="http://jonathanlewis.wordpress.com/2010/01/26/aliases/" rel="nofollow">http://jonathanlewis.wordpress.com/2010/01/26/aliases/</a> Unfortunately, if you’ve installed Spatial, there are two functions (called ogc_x and ogc_y) which has been given public synonyms X and Y respectively that move Oracle into the function-call validity checks – which is where the pls error comes from. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Index Join &#8211; 3 &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2010/01/26/aliases/#comment-38244</link>
		<dc:creator><![CDATA[Index Join &#8211; 3 &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Tue, 07 Dec 2010 18:02:33 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2913#comment-38244</guid>
		<description><![CDATA[[...] the code so hard to read, especially when it&#8217;s all in upper case. It&#8217;s important to use aliases, of course, but 3 or 4 letters is a sensible [...]]]></description>
		<content:encoded><![CDATA[<p>[...] the code so hard to read, especially when it&#8217;s all in upper case. It&#8217;s important to use aliases, of course, but 3 or 4 letters is a sensible [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Log Buffer #180: a Carnival of the Vanities for DBAs &#124; The Pythian Blog</title>
		<link>http://jonathanlewis.wordpress.com/2010/01/26/aliases/#comment-35612</link>
		<dc:creator><![CDATA[Log Buffer #180: a Carnival of the Vanities for DBAs &#124; The Pythian Blog]]></dc:creator>
		<pubDate>Fri, 26 Feb 2010 18:04:25 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2913#comment-35612</guid>
		<description><![CDATA[[...] Lewis shares an explication of aliases: &#8220;I was asked the following question recently: &#8216;Does the use of table aliases affect [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Lewis shares an explication of aliases: &#8220;I was asked the following question recently: &#8216;Does the use of table aliases affect [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blogroll Report 22/01/2009 – 29/01/2010 &#171; Coskan&#8217;s Approach to Oracle</title>
		<link>http://jonathanlewis.wordpress.com/2010/01/26/aliases/#comment-35560</link>
		<dc:creator><![CDATA[Blogroll Report 22/01/2009 – 29/01/2010 &#171; Coskan&#8217;s Approach to Oracle]]></dc:creator>
		<pubDate>Sun, 21 Feb 2010 03:25:53 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2913#comment-35560</guid>
		<description><![CDATA[[...] 7-How to use column aliases with SQL queries? (comments) Jonathan Lewis-Aliases [...]]]></description>
		<content:encoded><![CDATA[<p>[...] 7-How to use column aliases with SQL queries? (comments) Jonathan Lewis-Aliases [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Slow Query with an Interesting Execution Plan &#171; Charles Hooper&#39;s Oracle Notes</title>
		<link>http://jonathanlewis.wordpress.com/2010/01/26/aliases/#comment-35433</link>
		<dc:creator><![CDATA[Slow Query with an Interesting Execution Plan &#171; Charles Hooper&#39;s Oracle Notes]]></dc:creator>
		<pubDate>Mon, 08 Feb 2010 06:03:12 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2913#comment-35433</guid>
		<description><![CDATA[[...] so looking at the Predicate Information section of a DBMS_XPLAN output could be confusing.  A recent article on another blog offers suggestions for improving the readability of table [...]]]></description>
		<content:encoded><![CDATA[<p>[...] so looking at the Predicate Information section of a DBMS_XPLAN output could be confusing.  A recent article on another blog offers suggestions for improving the readability of table [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JohnK</title>
		<link>http://jonathanlewis.wordpress.com/2010/01/26/aliases/#comment-35357</link>
		<dc:creator><![CDATA[JohnK]]></dc:creator>
		<pubDate>Sat, 30 Jan 2010 11:06:43 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2913#comment-35357</guid>
		<description><![CDATA[On one project I worked on when you created a new table you also were required to add a comment on the table with name to be used as the alias, something like &quot;COMMENT &#039;ALIAS=ORD&quot;. This enabled all developers to look up the alias names through the data dictionary. I always thought it would be nice to have an additional attribute on a table that was specificly for the alias.]]></description>
		<content:encoded><![CDATA[<p>On one project I worked on when you created a new table you also were required to add a comment on the table with name to be used as the alias, something like &#8220;COMMENT &#8216;ALIAS=ORD&#8221;. This enabled all developers to look up the alias names through the data dictionary. I always thought it would be nice to have an additional attribute on a table that was specificly for the alias.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://jonathanlewis.wordpress.com/2010/01/26/aliases/#comment-35343</link>
		<dc:creator><![CDATA[Andy]]></dc:creator>
		<pubDate>Thu, 28 Jan 2010 04:52:46 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2913#comment-35343</guid>
		<description><![CDATA[Thanks for clarifying. The one I found is almost similar:
[sourcecode]
select ... 
from tab1
where exists (
          select c1 
          from tab2
          );
[/sourcecode]
In this case, c1 does not belong to tab2, but exists in tab1. The query runs without error.]]></description>
		<content:encoded><![CDATA[<p>Thanks for clarifying. The one I found is almost similar:</p>
<pre class="brush: plain; title: ; notranslate">
select ... 
from tab1
where exists (
          select c1 
          from tab2
          );
</pre>
<p>In this case, c1 does not belong to tab2, but exists in tab1. The query runs without error.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mwidlake</title>
		<link>http://jonathanlewis.wordpress.com/2010/01/26/aliases/#comment-35341</link>
		<dc:creator><![CDATA[mwidlake]]></dc:creator>
		<pubDate>Thu, 28 Jan 2010 00:17:27 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2913#comment-35341</guid>
		<description><![CDATA[I&#039;m relly hoping the comment by jametong to use &quot;a,b,c&quot; is ironic as I wince when I see the use of these as alisas in queries as the aliases are meaningless - you have to keep scanning back to the FROM list with it&#039;s tables and aliases to make sense of the rest of the query.
I was forced, many many years back, to use &quot;four&quot; letter aliases. A single-word table, you take four letters, so table PERSON would have the alias PERS. For two-word table names it was two letters from each. PERSON_NAME became PENA. For three-word and above tsbles it was one letter per word. So PERSON_NAME_HISTORY was PNH, PATIENT_CLINCAL_NOTES was PCN and PATIENT_PRIMARY_CONTACT_DETAILS would be PPCD. Within a couple of weeks of someone new starting on the project they were using the aliases to refer to the tables. Naming key was simple. The PERSON_ADDRESS table had a primary key called PEAD_PK. Consultant to Consultant Speciality foreign key was CONS_COSP_FK, etc, etc, etc. You no longer had to think about what to call constraints, sequences, etc, it all flowed from the table alias names.
Does anyone still use this sort of thing? It works for me but seems rare on customer sites.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m relly hoping the comment by jametong to use &#8220;a,b,c&#8221; is ironic as I wince when I see the use of these as alisas in queries as the aliases are meaningless &#8211; you have to keep scanning back to the FROM list with it&#8217;s tables and aliases to make sense of the rest of the query.<br />
I was forced, many many years back, to use &#8220;four&#8221; letter aliases. A single-word table, you take four letters, so table PERSON would have the alias PERS. For two-word table names it was two letters from each. PERSON_NAME became PENA. For three-word and above tsbles it was one letter per word. So PERSON_NAME_HISTORY was PNH, PATIENT_CLINCAL_NOTES was PCN and PATIENT_PRIMARY_CONTACT_DETAILS would be PPCD. Within a couple of weeks of someone new starting on the project they were using the aliases to refer to the tables. Naming key was simple. The PERSON_ADDRESS table had a primary key called PEAD_PK. Consultant to Consultant Speciality foreign key was CONS_COSP_FK, etc, etc, etc. You no longer had to think about what to call constraints, sequences, etc, it all flowed from the table alias names.<br />
Does anyone still use this sort of thing? It works for me but seems rare on customer sites.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://jonathanlewis.wordpress.com/2010/01/26/aliases/#comment-35338</link>
		<dc:creator><![CDATA[Gary]]></dc:creator>
		<pubDate>Wed, 27 Jan 2010 22:04:32 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2913#comment-35338</guid>
		<description><![CDATA[There are also APEX procedures/function called F, P, V and Z.]]></description>
		<content:encoded><![CDATA[<p>There are also APEX procedures/function called F, P, V and Z.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2010/01/26/aliases/#comment-35336</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Wed, 27 Jan 2010 19:04:53 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2913#comment-35336</guid>
		<description><![CDATA[That&#039;s right - it&#039;s a variant of the &quot;column capture&quot; problem.  

Since x.abc isn&#039;t {alias.column} Oracle tries to interpret it as a call to a function or operator.

Unfortunately, if you&#039;ve installed Spatial, there are two functions (called ogc_x and ogc_y) which has been given public synonyms X and Y respectively that move Oracle into the function-call validity checks - which is where the pls error comes from.

There are a couple more public synonyms which might cause the same (or similar) errors - for example:  
[sourcecode]
select path.abc from dual;
ERROR at line 1:
ORA-29900: operator binding does not exist
ORA-06553: PLS-306: wrong number or types of arguments in call to &#039;PATH&#039;
[/sourcecode]
(PATH is a public synonym for an &lt;em&gt;&lt;strong&gt;operator&lt;/strong&gt;&lt;/em&gt; owned by XDB called PATH - and since it&#039;s an operator the leading ORA-29900)

You have to be a little unlucky to get these unexpected errors, though.  You&#039;ve got to use an alias that happens to be a synonym for a function or operator on which you have execute privileges, and then you have to reference a column that doesn&#039;t exist.
]]></description>
		<content:encoded><![CDATA[<p>That&#8217;s right &#8211; it&#8217;s a variant of the &#8220;column capture&#8221; problem.  </p>
<p>Since x.abc isn&#8217;t {alias.column} Oracle tries to interpret it as a call to a function or operator.</p>
<p>Unfortunately, if you&#8217;ve installed Spatial, there are two functions (called ogc_x and ogc_y) which has been given public synonyms X and Y respectively that move Oracle into the function-call validity checks &#8211; which is where the pls error comes from.</p>
<p>There are a couple more public synonyms which might cause the same (or similar) errors &#8211; for example:  </p>
<pre class="brush: plain; title: ; notranslate">
select path.abc from dual;
ERROR at line 1:
ORA-29900: operator binding does not exist
ORA-06553: PLS-306: wrong number or types of arguments in call to 'PATH'
</pre>
<p>(PATH is a public synonym for an <em><strong>operator</strong></em> owned by XDB called PATH &#8211; and since it&#8217;s an operator the leading ORA-29900)</p>
<p>You have to be a little unlucky to get these unexpected errors, though.  You&#8217;ve got to use an alias that happens to be a synonym for a function or operator on which you have execute privileges, and then you have to reference a column that doesn&#8217;t exist.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
