<?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: simple index in Proc SQL in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/simple-index-in-Proc-SQL/m-p/168308#M43565</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are defining an index on an external (rdbms oracle) table . Normally a DBA's type of work. &lt;BR /&gt;The SQL pass through code can be checked using the sastrace option.&lt;/P&gt;&lt;P&gt;Creating an index with unique is telling there should be no duplicates. I expect duplicated on state. This it the error you are getting.&lt;/P&gt;&lt;P&gt;....&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Oct 2014 18:35:15 GMT</pubDate>
    <dc:creator>jakarman</dc:creator>
    <dc:date>2014-10-01T18:35:15Z</dc:date>
    <item>
      <title>simple index in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/simple-index-in-Proc-SQL/m-p/168305#M43562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the below, but SAS log file is stating an error exists with my index statement.&amp;nbsp; Is this the best way of adding an index to create table statement?&amp;nbsp; Should I have the index statement in a different location?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P align="left"&gt;CREATE TABLE TEST AS&lt;/P&gt;&lt;P&gt;SELECT * FROM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONNECTION TO ORACLE(&lt;/P&gt;&lt;P&gt;SELECT STATE, SALES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P align="left"&gt;FROM SALES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P align="left"&gt;WHERE STATE IN ('IL','OH');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;create unique index indx1 on sales(state);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DISCONNECT FROM ORACLE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 17:07:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/simple-index-in-Proc-SQL/m-p/168305#M43562</guid>
      <dc:creator>sasboy007</dc:creator>
      <dc:date>2014-10-01T17:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: simple index in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/simple-index-in-Proc-SQL/m-p/168306#M43563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the documentation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="userSuppliedValue"&gt;index-name &lt;/SPAN&gt;names the index that you are creating. If you are creating an index on one column only, then &lt;SPAN class="userSuppliedValue"&gt;index-name&lt;/SPAN&gt; must be the same as &lt;SPAN class="userSuppliedValue"&gt;column&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like the index name has to be STATE not INDX1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 17:19:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/simple-index-in-Proc-SQL/m-p/168306#M43563</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-10-01T17:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: simple index in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/simple-index-in-Proc-SQL/m-p/168307#M43564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Same thing.&amp;nbsp; Getting the following error on index, although the query runs correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ERROR: Duplicate values not allowed on index state&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 17:45:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/simple-index-in-Proc-SQL/m-p/168307#M43564</guid>
      <dc:creator>sasboy007</dc:creator>
      <dc:date>2014-10-01T17:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: simple index in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/simple-index-in-Proc-SQL/m-p/168308#M43565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are defining an index on an external (rdbms oracle) table . Normally a DBA's type of work. &lt;BR /&gt;The SQL pass through code can be checked using the sastrace option.&lt;/P&gt;&lt;P&gt;Creating an index with unique is telling there should be no duplicates. I expect duplicated on state. This it the error you are getting.&lt;/P&gt;&lt;P&gt;....&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 18:35:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/simple-index-in-Proc-SQL/m-p/168308#M43565</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-10-01T18:35:15Z</dc:date>
    </item>
  </channel>
</rss>

