<?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: Output file using proc sql in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Output-file-using-proc-sql/m-p/69136#M19824</link>
    <description>Hi Lani,&lt;BR /&gt;
&lt;BR /&gt;
add distinct on your select statement&lt;BR /&gt;
&lt;BR /&gt;
Milton</description>
    <pubDate>Thu, 18 Mar 2010 01:14:43 GMT</pubDate>
    <dc:creator>milts</dc:creator>
    <dc:date>2010-03-18T01:14:43Z</dc:date>
    <item>
      <title>Output file using proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-file-using-proc-sql/m-p/69135#M19823</link>
      <description>I have a data set bill_cnts with the followings&lt;BR /&gt;
id		name		count&lt;BR /&gt;
123		John Sample	   23&lt;BR /&gt;
123		John Sample	   23&lt;BR /&gt;
888		Jane Smith	   40&lt;BR /&gt;
888		Jane Smith	   40&lt;BR /&gt;
&lt;BR /&gt;
I'd like to create an output to show like the followings&lt;BR /&gt;
id		name		count&lt;BR /&gt;
123		John Sample	   46&lt;BR /&gt;
888		Jane Smith	   80&lt;BR /&gt;
&lt;BR /&gt;
But, the output I have is&lt;BR /&gt;
id		name		count&lt;BR /&gt;
123		John Sample	   46&lt;BR /&gt;
123		John Sample	   46&lt;BR /&gt;
888		Jane Smith	   80&lt;BR /&gt;
888		Jane Smith	   80&lt;BR /&gt;
&lt;BR /&gt;
Here is my code&lt;BR /&gt;
proc sql;&lt;BR /&gt;
   create table bill as&lt;BR /&gt;
      select id,name,sum(count) &lt;BR /&gt;
      from bill_cnts&lt;BR /&gt;
      group by id&lt;BR /&gt;
      order by id;&lt;BR /&gt;
quit;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Please advise what I did wrong. Thanks for your help.&lt;BR /&gt;
&lt;BR /&gt;
Lani</description>
      <pubDate>Wed, 17 Mar 2010 23:34:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-file-using-proc-sql/m-p/69135#M19823</guid>
      <dc:creator>Lani</dc:creator>
      <dc:date>2010-03-17T23:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Output file using proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-file-using-proc-sql/m-p/69136#M19824</link>
      <description>Hi Lani,&lt;BR /&gt;
&lt;BR /&gt;
add distinct on your select statement&lt;BR /&gt;
&lt;BR /&gt;
Milton</description>
      <pubDate>Thu, 18 Mar 2010 01:14:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-file-using-proc-sql/m-p/69136#M19824</guid>
      <dc:creator>milts</dc:creator>
      <dc:date>2010-03-18T01:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Output file using proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-file-using-proc-sql/m-p/69137#M19825</link>
      <description>Thanks Milton. It works.&lt;BR /&gt;
&lt;BR /&gt;
-Lani</description>
      <pubDate>Thu, 18 Mar 2010 19:59:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-file-using-proc-sql/m-p/69137#M19825</guid>
      <dc:creator>Lani</dc:creator>
      <dc:date>2010-03-18T19:59:13Z</dc:date>
    </item>
  </channel>
</rss>

