<?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: Problem while merging in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Problem-while-merging/m-p/300898#M1209</link>
    <description>I am still not getting the desired output.&lt;BR /&gt;both the data sets have the same values of probability and other columns&lt;BR /&gt;too which i require but i want that the output should be all the required&lt;BR /&gt;columns of set 1 and only 1 column to be joined to that set 1based on&lt;BR /&gt;probability,i dont want repeating probabilities.&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;create table p1 as select a.Probability____ , a.Account_Name as client&lt;BR /&gt;,a.Opportunity_Owner as champ,&lt;BR /&gt;a.Last_Modified_Date as modified , sum(a.Total_Media_Value) as&lt;BR /&gt;Tot_Budget,a.Deal_Comments,&lt;BR /&gt;&lt;BR /&gt;b.Total_Media_Value as Digital_bdgt&lt;BR /&gt;from d.p3 as a left join dig as b&lt;BR /&gt;on a.Probability____= b.Probability____&lt;BR /&gt;group by a.Probability____&lt;BR /&gt;order by a.Probability____ desc;&lt;BR /&gt;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
    <pubDate>Tue, 27 Sep 2016 00:19:35 GMT</pubDate>
    <dc:creator>rishabhmehra13</dc:creator>
    <dc:date>2016-09-27T00:19:35Z</dc:date>
    <item>
      <title>Problem while merging</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Problem-while-merging/m-p/300894#M1207</link>
      <description>&lt;P&gt;i want to join table d.p4 with dig ,Probability is the id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table p1 as select a.Account_Name as client ,a.Opportunity_Owner as champ,&lt;BR /&gt;a.Last_Modified_Date as modified , sum(a.Total_Media_Value) as Tot_Budget,a.Deal_Comments,&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;b.Total_Media_Value as Digital_bdgt&lt;BR /&gt;from d.p3 as a left join dig as b&lt;BR /&gt;on a.Probability____= b.Probability____&lt;BR /&gt;group by Probability____&lt;BR /&gt;order by&amp;nbsp; Probability____ desc;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;log&lt;/P&gt;&lt;DIV class="sasSource"&gt;63&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by Probability____&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;64&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; order by&amp;nbsp; Probability____ desc;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Ambiguous reference, column Probability____ is in more than one table.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Ambiguous reference, column Probability____ is in more than one table.&lt;/DIV&gt;</description>
      <pubDate>Mon, 26 Sep 2016 23:53:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Problem-while-merging/m-p/300894#M1207</guid>
      <dc:creator>rishabhmehra13</dc:creator>
      <dc:date>2016-09-26T23:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while merging</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Problem-while-merging/m-p/300896#M1208</link>
      <description>&lt;P&gt;When you joined the data sets, you specified a.Probability___ or b.Probability___. &amp;nbsp;That's the right way to do it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you get to GROUP BY or ORDER BY, you have to do the same thing. &amp;nbsp;Pick one. &amp;nbsp;When you just say Probability___, SQL doesn't know which one you mean.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 00:14:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Problem-while-merging/m-p/300896#M1208</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-09-27T00:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while merging</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Problem-while-merging/m-p/300898#M1209</link>
      <description>I am still not getting the desired output.&lt;BR /&gt;both the data sets have the same values of probability and other columns&lt;BR /&gt;too which i require but i want that the output should be all the required&lt;BR /&gt;columns of set 1 and only 1 column to be joined to that set 1based on&lt;BR /&gt;probability,i dont want repeating probabilities.&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;create table p1 as select a.Probability____ , a.Account_Name as client&lt;BR /&gt;,a.Opportunity_Owner as champ,&lt;BR /&gt;a.Last_Modified_Date as modified , sum(a.Total_Media_Value) as&lt;BR /&gt;Tot_Budget,a.Deal_Comments,&lt;BR /&gt;&lt;BR /&gt;b.Total_Media_Value as Digital_bdgt&lt;BR /&gt;from d.p3 as a left join dig as b&lt;BR /&gt;on a.Probability____= b.Probability____&lt;BR /&gt;group by a.Probability____&lt;BR /&gt;order by a.Probability____ desc;&lt;BR /&gt;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Tue, 27 Sep 2016 00:19:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Problem-while-merging/m-p/300898#M1209</guid>
      <dc:creator>rishabhmehra13</dc:creator>
      <dc:date>2016-09-27T00:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while merging</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Problem-while-merging/m-p/300900#M1210</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/98572"&gt;@rishabhmehra13&lt;/a&gt; wrote:&lt;BR /&gt;&amp;nbsp;i want that the output should be all the required&lt;BR /&gt;&lt;BR /&gt;columns of set 1 and only 1 column to be joined to that set 1based on&lt;BR /&gt;probability,i dont want repeating probabilities.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you include variables NOT in your group by clause (or an aggregate function) in your SELECT statement they are considered distinct and are repeated for each row. If you want distinct values add them to your group by or an aggregate function as appropriate.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 00:37:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Problem-while-merging/m-p/300900#M1210</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-09-27T00:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while merging</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Problem-while-merging/m-p/300901#M1211</link>
      <description>&lt;P&gt;better display a&amp;nbsp;group of input and its output to show what is wrong&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 00:40:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Problem-while-merging/m-p/300901#M1211</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-09-27T00:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while merging</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Problem-while-merging/m-p/300925#M1214</link>
      <description>&lt;P&gt;All variables in the select that are not the subject of a summary function need to go into the group by clause.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 06:02:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Problem-while-merging/m-p/300925#M1214</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-09-27T06:02:21Z</dc:date>
    </item>
  </channel>
</rss>

