<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Why does the ALIAS cause an error? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Why-does-the-ALIAS-cause-an-error/m-p/318747#M69878</link>
    <description>&lt;P&gt;Yeah. Firstly you need make this SQL is a legal oracle SQL, talk to your oracle DBA.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Dec 2016 03:42:13 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2016-12-14T03:42:13Z</dc:date>
    <item>
      <title>Why does the ALIAS cause an error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-does-the-ALIAS-cause-an-error/m-p/318620#M69829</link>
      <description>&lt;P&gt;Hello Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I stumbled upon a weird thing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the pass through facility in order to send a query to an ORACLE database and create a table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the second PROC SQL Statement in the picture below, it works fine:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/6356iB16FFF23CA054721/image-size/original?v=v2&amp;amp;px=-1" alt="Abfragen_SQL.JPG" title="Abfragen_SQL.JPG" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I run the upper PROC SQL Statement I get an error message, telling me the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"ORA-00933: SQL command not properly ended"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All I changed between the two PROC SQL Statements is that I assigned an ALIAS to the table WANT. Why does Oracle have trouble with this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help from you guys would be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Felix&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 16:28:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-does-the-ALIAS-cause-an-error/m-p/318620#M69829</guid>
      <dc:creator>FK1</dc:creator>
      <dc:date>2016-12-13T16:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the ALIAS cause an error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-does-the-ALIAS-cause-an-error/m-p/318636#M69833</link>
      <description>&lt;P&gt;A guess:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you supply an alias, SQL assumes that you will be reading from more than one source of data.&amp;nbsp; After all, why assign an alias if you are only reading from one source?&amp;nbsp; When&amp;nbsp;SQL doesn't see a second source, it generates the error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 16:48:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-does-the-ALIAS-cause-an-error/m-p/318636#M69833</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-12-13T16:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the ALIAS cause an error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-does-the-ALIAS-cause-an-error/m-p/318701#M69855</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;: Thank you for your answer, but I do not think this is the reason. When running the following SAS code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select A.height
from sashelp.class as A;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I do not get any error messages in the log. But of course this could also be related to the fact that the above statment is being processed locally and not by the means of the pass through facility....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/6359i1DCF4281EA9B0131/image-size/original?v=v2&amp;amp;px=-1" alt="Gegenbeispiel.JPG" title="Gegenbeispiel.JPG" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 21:31:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-does-the-ALIAS-cause-an-error/m-p/318701#M69855</guid>
      <dc:creator>FK1</dc:creator>
      <dc:date>2016-12-13T21:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the ALIAS cause an error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-does-the-ALIAS-cause-an-error/m-p/318705#M69856</link>
      <description>&lt;P&gt;As you noted, it could be the pass-through feature.&amp;nbsp; Each SQL implementation has its own quirks.&amp;nbsp; Perhaps you could try a version of the successfully executing alias, but use that syntax directly on the pass-through system.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 21:45:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-does-the-ALIAS-cause-an-error/m-p/318705#M69856</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-12-13T21:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the ALIAS cause an error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-does-the-ALIAS-cause-an-error/m-p/318747#M69878</link>
      <description>&lt;P&gt;Yeah. Firstly you need make this SQL is a legal oracle SQL, talk to your oracle DBA.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 03:42:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-does-the-ALIAS-cause-an-error/m-p/318747#M69878</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-12-14T03:42:13Z</dc:date>
    </item>
  </channel>
</rss>

