<?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: Records Count in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Records-Count/m-p/3589#M1533</link>
    <description>Sorry for stupid question&lt;BR /&gt;
&lt;BR /&gt;
the solution is &lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;select count(Field1) as COUNT, Field2, Field3 from Table1&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
Am I right?</description>
    <pubDate>Mon, 25 Jun 2007 12:30:14 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2007-06-25T12:30:14Z</dc:date>
    <item>
      <title>Records Count</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Records-Count/m-p/3586#M1530</link>
      <description>Is there in SAS function to return records count of the table?</description>
      <pubDate>Mon, 25 Jun 2007 11:49:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Records-Count/m-p/3586#M1530</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-06-25T11:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Records Count</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Records-Count/m-p/3587#M1531</link>
      <description>Data X;&lt;BR /&gt;
A=1;&lt;BR /&gt;
;&lt;BR /&gt;
Run;&lt;BR /&gt;
&lt;BR /&gt;
Proc SQL;&lt;BR /&gt;
Create table COUNT as select * from dictionary.tables&lt;BR /&gt;
Where Libname='WORK' and memname='X';&lt;BR /&gt;
Quit;</description>
      <pubDate>Mon, 25 Jun 2007 12:09:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Records-Count/m-p/3587#M1531</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-06-25T12:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Records Count</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Records-Count/m-p/3588#M1532</link>
      <description>Thanks.&lt;BR /&gt;
&lt;BR /&gt;
If I want only distinct records (by Field1), I must execute 2 queries?&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;create table test as (&lt;BR /&gt;
       select distinct Field1, Field2, Field3 from Table1&lt;BR /&gt;
);&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
and after&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;select count(*) into: COUNT from test;&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
Or I can do it in one step?</description>
      <pubDate>Mon, 25 Jun 2007 12:16:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Records-Count/m-p/3588#M1532</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-06-25T12:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: Records Count</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Records-Count/m-p/3589#M1533</link>
      <description>Sorry for stupid question&lt;BR /&gt;
&lt;BR /&gt;
the solution is &lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;select count(Field1) as COUNT, Field2, Field3 from Table1&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
Am I right?</description>
      <pubDate>Mon, 25 Jun 2007 12:30:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Records-Count/m-p/3589#M1533</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-06-25T12:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Records Count</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Records-Count/m-p/3590#M1534</link>
      <description>I think you need something like this:&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
create table NEW_TABLE as&lt;BR /&gt;
select Field1, Field2, Field3&lt;BR /&gt;
           count(Field3) as COUNT3,&lt;BR /&gt;
           count(Field2) as Count2,&lt;BR /&gt;
           count(distinct Field1) as Count1_DISTINCT&lt;BR /&gt;
from YOUR_TABLE;&lt;BR /&gt;
quit;</description>
      <pubDate>Tue, 26 Jun 2007 07:49:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Records-Count/m-p/3590#M1534</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-06-26T07:49:36Z</dc:date>
    </item>
  </channel>
</rss>

