<?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: Proc transpose and inner join in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-and-inner-join/m-p/432462#M107116</link>
    <description>&lt;P&gt;This means you have duplicates that you need to remove OR you need to add a condition to your join or WHERE to filter out the records.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Determine why some have duplicates first, or how you would identify which records to keep and then we can help you out.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/183598"&gt;@parmis&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to inner join two datasets with 4 field in each. 3 of the fields are the same in both tables;&lt;/P&gt;
&lt;P&gt;data set Nov: ACCTNB, ID, SourceACCT, Amount_Nov&lt;/P&gt;
&lt;P&gt;data set Dec: ACCTNB, ID, SourceACCT,&amp;nbsp;Amount_Dec&lt;/P&gt;
&lt;P&gt;I'm trying o inner join these data sets&amp;nbsp;to compare the amounts and see if&amp;nbsp; customers are paying different amount in two months. The problem is if there is one transaction for ID1 in Dec and three transactions for the same ID in Nov,&amp;nbsp;SAS duplicates the Dec data three times to match Nov data.&lt;/P&gt;
&lt;P&gt;how can I solve this problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jan 2018 19:37:29 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-01-30T19:37:29Z</dc:date>
    <item>
      <title>Proc transpose and inner join</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-and-inner-join/m-p/432450#M107114</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to inner join two datasets with 4 field in each. 3 of the fields are the same in both tables;&lt;/P&gt;&lt;P&gt;data set Nov: ACCTNB, ID, SourceACCT, Amount_Nov&lt;/P&gt;&lt;P&gt;data set Dec: ACCTNB, ID, SourceACCT,&amp;nbsp;Amount_Dec&lt;/P&gt;&lt;P&gt;I'm trying o inner join these data sets&amp;nbsp;to compare the amounts and see if&amp;nbsp; customers are paying different amount in two months. The problem is if there is one transaction for ID1 in Dec and three transactions for the same ID in Nov,&amp;nbsp;SAS duplicates the Dec data three times to match Nov data.&lt;/P&gt;&lt;P&gt;how can I solve this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 19:14:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-and-inner-join/m-p/432450#M107114</guid>
      <dc:creator>parmis</dc:creator>
      <dc:date>2018-01-30T19:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose and inner join</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-and-inner-join/m-p/432462#M107116</link>
      <description>&lt;P&gt;This means you have duplicates that you need to remove OR you need to add a condition to your join or WHERE to filter out the records.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Determine why some have duplicates first, or how you would identify which records to keep and then we can help you out.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/183598"&gt;@parmis&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to inner join two datasets with 4 field in each. 3 of the fields are the same in both tables;&lt;/P&gt;
&lt;P&gt;data set Nov: ACCTNB, ID, SourceACCT, Amount_Nov&lt;/P&gt;
&lt;P&gt;data set Dec: ACCTNB, ID, SourceACCT,&amp;nbsp;Amount_Dec&lt;/P&gt;
&lt;P&gt;I'm trying o inner join these data sets&amp;nbsp;to compare the amounts and see if&amp;nbsp; customers are paying different amount in two months. The problem is if there is one transaction for ID1 in Dec and three transactions for the same ID in Nov,&amp;nbsp;SAS duplicates the Dec data three times to match Nov data.&lt;/P&gt;
&lt;P&gt;how can I solve this problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 19:37:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-and-inner-join/m-p/432462#M107116</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-30T19:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose and inner join</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-and-inner-join/m-p/432464#M107117</link>
      <description>&lt;P&gt;Name the amount variable same in all datasets.&lt;/P&gt;
&lt;P&gt;Use a data step to concatenate all datasets, and use the indsname option, so that the sources are identified in the final dataset.&lt;/P&gt;
&lt;P&gt;Now you can use by-group processing to summarize for each month, each account, etc&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 19:38:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-and-inner-join/m-p/432464#M107117</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-30T19:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose and inner join</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-and-inner-join/m-p/432477#M107125</link>
      <description>&lt;P&gt;Could you explain more&amp;nbsp;about "using the indsname option"?&lt;/P&gt;&lt;P&gt;I changed the Amount variable to be the same in both data sets, and I used data step to concatenate the data. now I have one data set with four variables.&lt;/P&gt;&lt;P&gt;Now, what would be the next step?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 20:01:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-and-inner-join/m-p/432477#M107125</guid>
      <dc:creator>parmis</dc:creator>
      <dc:date>2018-01-30T20:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose and inner join</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-and-inner-join/m-p/432478#M107126</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class1; set sashelp.class; run;
data class2; set sashelp.class; run;

data class3; set sashelp.class; run;

data combined;
set class1-class3 indsname=source;
dsn_input = source;
run;

proc means data=combined n mean std max min median;
class dsn_input;
var weight;
run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/183598"&gt;@parmis&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Could you explain more&amp;nbsp;about "using the indsname option"?&lt;/P&gt;
&lt;P&gt;I changed the Amount variable to be the same in both data sets, and I used data step to concatenate the data. now I have one data set with four variables.&lt;/P&gt;
&lt;P&gt;Now, what would be the next step?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 20:04:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-and-inner-join/m-p/432478#M107126</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-30T20:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose and inner join</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-and-inner-join/m-p/432620#M107165</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/183598"&gt;@parmis&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Could you explain more&amp;nbsp;about "using the indsname option"?&lt;/P&gt;
&lt;P&gt;I changed the Amount variable to be the same in both data sets, and I used data step to concatenate the data. now I have one data set with four variables.&lt;/P&gt;
&lt;P&gt;Now, what would be the next step?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I can see that, while I was resting in Morpheus' arms, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; gave you a nice example. Use it as blueprint for your datasets.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 07:00:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-and-inner-join/m-p/432620#M107165</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-31T07:00:34Z</dc:date>
    </item>
  </channel>
</rss>

