<?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: Contents of Oracle  Library/Tables ...No. of Obs in a Oracle Table in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Contents-of-Oracle-Library-Tables-No-of-Obs-in-a-Oracle-Table/m-p/72262#M20932</link>
    <description>If your DBA has given you the appropriate permissions, you can query the Oracle system tables.  Use “SYS” as the schema when you assign a library to the system tables:&lt;BR /&gt;
&lt;BR /&gt;
LIBNAME justSYS ORACLE &lt;BR /&gt;
PATH=Total.world &lt;BR /&gt;
SCHEMA=’SYS’ &lt;BR /&gt;
USER=xxxxx &lt;BR /&gt;
PASSWORD="xxxxxxx";&lt;BR /&gt;
&lt;BR /&gt;
You should be able to query the justSYS.ALL_TABLES view to obtain the number of observations in a given table.  Specifically, look at using the TABLE_NAME and NUM_ROWS variables.</description>
    <pubDate>Thu, 02 Jun 2011 20:15:39 GMT</pubDate>
    <dc:creator>polingjw</dc:creator>
    <dc:date>2011-06-02T20:15:39Z</dc:date>
    <item>
      <title>Contents of Oracle  Library/Tables ...No. of Obs in a Oracle Table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Contents-of-Oracle-Library-Tables-No-of-Obs-in-a-Oracle-Table/m-p/72261#M20931</link>
      <description>Code below gives me table information except for number of physical observations for all the tables in Justice Oracle library.&lt;BR /&gt;
&lt;BR /&gt;
 How can I get list of  library name, member name and no. of records in each table? &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
LIBNAME justice ORACLE  &lt;BR /&gt;
                PATH=Total.world  &lt;BR /&gt;
                SCHEMA=usa  &lt;BR /&gt;
                USER=xxxxx  &lt;BR /&gt;
                PASSWORD="xxxxxxx" &lt;BR /&gt;
                READBUFF=1&lt;BR /&gt;
                ; &lt;BR /&gt;
&lt;BR /&gt;
Proc Sql ;&lt;BR /&gt;
create table test1 as&lt;BR /&gt;
select libname, memname, nobs&lt;BR /&gt;
from dictionary.tables&lt;BR /&gt;
where libname='JUSTICE' ;&lt;BR /&gt;
quit ;</description>
      <pubDate>Thu, 02 Jun 2011 19:15:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Contents-of-Oracle-Library-Tables-No-of-Obs-in-a-Oracle-Table/m-p/72261#M20931</guid>
      <dc:creator>GPatel</dc:creator>
      <dc:date>2011-06-02T19:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Contents of Oracle  Library/Tables ...No. of Obs in a Oracle Table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Contents-of-Oracle-Library-Tables-No-of-Obs-in-a-Oracle-Table/m-p/72262#M20932</link>
      <description>If your DBA has given you the appropriate permissions, you can query the Oracle system tables.  Use “SYS” as the schema when you assign a library to the system tables:&lt;BR /&gt;
&lt;BR /&gt;
LIBNAME justSYS ORACLE &lt;BR /&gt;
PATH=Total.world &lt;BR /&gt;
SCHEMA=’SYS’ &lt;BR /&gt;
USER=xxxxx &lt;BR /&gt;
PASSWORD="xxxxxxx";&lt;BR /&gt;
&lt;BR /&gt;
You should be able to query the justSYS.ALL_TABLES view to obtain the number of observations in a given table.  Specifically, look at using the TABLE_NAME and NUM_ROWS variables.</description>
      <pubDate>Thu, 02 Jun 2011 20:15:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Contents-of-Oracle-Library-Tables-No-of-Obs-in-a-Oracle-Table/m-p/72262#M20932</guid>
      <dc:creator>polingjw</dc:creator>
      <dc:date>2011-06-02T20:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: Contents of Oracle  Library/Tables ...No. of Obs in a Oracle Table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Contents-of-Oracle-Library-Tables-No-of-Obs-in-a-Oracle-Table/m-p/72263#M20933</link>
      <description>Another way.&lt;BR /&gt;
If you want, using proc copy or proc cport to copy these tables from Oracle to local computer,then use your code to query.But It is low efficient.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Fri, 03 Jun 2011 02:43:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Contents-of-Oracle-Library-Tables-No-of-Obs-in-a-Oracle-Table/m-p/72263#M20933</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-06-03T02:43:23Z</dc:date>
    </item>
  </channel>
</rss>

