<?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 oracle tables access with special chars in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/oracle-tables-access-with-special-chars/m-p/390270#M93586</link>
    <description>&lt;P&gt;hi Guys,&lt;BR /&gt;I have an issue while accessing tables with characters like $ in their names&lt;BR /&gt;for example, the below one works well with SAS datasets&lt;/P&gt;
&lt;P&gt;proc contents data=abc.'au$co_auth$fc'n;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;select * from abc.'au$co_auth$fc'n;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;But if abc refers to ORACLE libname, I get error as below&lt;/P&gt;
&lt;P&gt;I now get the new error message reading: ERROR: The value 'AU$CO_AUTH$FC'n is not a valid SAS name.&lt;/P&gt;
&lt;P&gt;Please help how I can access such datasets. Thanks.&lt;/P&gt;
&lt;P&gt;Cheers&lt;BR /&gt;Mark&lt;/P&gt;</description>
    <pubDate>Wed, 23 Aug 2017 14:30:38 GMT</pubDate>
    <dc:creator>MarkNicholas</dc:creator>
    <dc:date>2017-08-23T14:30:38Z</dc:date>
    <item>
      <title>oracle tables access with special chars</title>
      <link>https://communities.sas.com/t5/SAS-Programming/oracle-tables-access-with-special-chars/m-p/390270#M93586</link>
      <description>&lt;P&gt;hi Guys,&lt;BR /&gt;I have an issue while accessing tables with characters like $ in their names&lt;BR /&gt;for example, the below one works well with SAS datasets&lt;/P&gt;
&lt;P&gt;proc contents data=abc.'au$co_auth$fc'n;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;select * from abc.'au$co_auth$fc'n;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;But if abc refers to ORACLE libname, I get error as below&lt;/P&gt;
&lt;P&gt;I now get the new error message reading: ERROR: The value 'AU$CO_AUTH$FC'n is not a valid SAS name.&lt;/P&gt;
&lt;P&gt;Please help how I can access such datasets. Thanks.&lt;/P&gt;
&lt;P&gt;Cheers&lt;BR /&gt;Mark&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 14:30:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/oracle-tables-access-with-special-chars/m-p/390270#M93586</guid>
      <dc:creator>MarkNicholas</dc:creator>
      <dc:date>2017-08-23T14:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: oracle tables access with special chars</title>
      <link>https://communities.sas.com/t5/SAS-Programming/oracle-tables-access-with-special-chars/m-p/390285#M93592</link>
      <description>&lt;P&gt;I think yoi need to havepreserve_tab_names=yes;&amp;nbsp; in your libname statement and then your logic should work or &amp;nbsp;please try something like this below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;libname mydblib oracle user=testuser password=testpass &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; preserve_tab_names=yes; &lt;BR /&gt;proc sql dquote=ansi;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; select * from mydblib."my table";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this was taken from&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a001342346.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a001342346.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 15:28:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/oracle-tables-access-with-special-chars/m-p/390285#M93592</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2017-08-23T15:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: oracle tables access with special chars</title>
      <link>https://communities.sas.com/t5/SAS-Programming/oracle-tables-access-with-special-chars/m-p/390481#M93675</link>
      <description>The above did not work. This time we get error the table cannot be found. Pls help</description>
      <pubDate>Thu, 24 Aug 2017 02:15:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/oracle-tables-access-with-special-chars/m-p/390481#M93675</guid>
      <dc:creator>MarkNicholas</dc:creator>
      <dc:date>2017-08-24T02:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: oracle tables access with special chars</title>
      <link>https://communities.sas.com/t5/SAS-Programming/oracle-tables-access-with-special-chars/m-p/390482#M93676</link>
      <description>&lt;P&gt;first check whether you are able to access other tables in this particular libname. try out explicit pass through also. I would also like to know expert opinion of&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH&lt;/a&gt;&amp;nbsp;on this topic&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 02:22:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/oracle-tables-access-with-special-chars/m-p/390482#M93676</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2017-08-24T02:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: oracle tables access with special chars</title>
      <link>https://communities.sas.com/t5/SAS-Programming/oracle-tables-access-with-special-chars/m-p/390484#M93677</link>
      <description>&lt;P&gt;The PRESERVE_COL_NAMES= and PRESERVE_TAB_NAMES= LIBNAME options determine how SAS/ACCESS Interface to Oracle handles case sensitivity, spaces, and special characters. Please use both of them in LIBNAME. Also, I do not see that you have specified SCHEMA=. SCHEMA= specifies the name that is assigned to a logical classification of objects in a relational database.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 02:50:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/oracle-tables-access-with-special-chars/m-p/390484#M93677</guid>
      <dc:creator>alexal</dc:creator>
      <dc:date>2017-08-24T02:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: oracle tables access with special chars</title>
      <link>https://communities.sas.com/t5/SAS-Programming/oracle-tables-access-with-special-chars/m-p/390487#M93679</link>
      <description>&lt;P&gt;Another option is to use passthru:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
&amp;nbsp; connect using ORALIB;
&amp;nbsp; select * from connection to ORALIB ( select * from CRAZYTABLENAME );
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The stuff between the parentheses is oracle syntax.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 03:24:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/oracle-tables-access-with-special-chars/m-p/390487#M93679</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-08-24T03:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: oracle tables access with special chars</title>
      <link>https://communities.sas.com/t5/SAS-Programming/oracle-tables-access-with-special-chars/m-p/390563#M93715</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/37783"&gt;@kiranv_&lt;/a&gt;. Not sure I can add to what have been already said.&lt;/P&gt;
&lt;P&gt;But I can't stop wonder why people make it so complicated.&amp;nbsp;Because you can, it doesn't mean it's a good idea to have table/column names with special/national/space chars etc. If you can't have the DBA rename things, perhaps creating views that comply with SAS naming standards is one way around it.&lt;/P&gt;
&lt;P&gt;Assume one way of&amp;nbsp;handling is not to preserve names, and then use _ (haven't tested though).&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 11:33:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/oracle-tables-access-with-special-chars/m-p/390563#M93715</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-08-24T11:33:20Z</dc:date>
    </item>
  </channel>
</rss>

