<?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 ERROR: The following columns were not found in the contributing tables in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-following-columns-were-not-found-in-the-contributing/m-p/93437#M977</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I was trying to do something like:&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13449734391172333" jivemacro_uid="_13449734391172333" modifiedtitle="true"&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;create table work.test as&lt;/P&gt;
&lt;P&gt;select col1,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col2,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put(col3, 3.) as new_col3,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(col4) as new_col4&lt;/P&gt;
&lt;P&gt;from source_table&lt;/P&gt;
&lt;P&gt;group by col1,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col2,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col3;&lt;/P&gt;
&lt;P&gt;quit; &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I constantly got an Error: The following columns were not found in the contributing tables: new_col3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did some search and understood that this kind of error usually appears when using some calculated value in the WHERE clause and can be solved by using the key word CALCULATED.&lt;/P&gt;&lt;P&gt;I am not sure if here's the same situation when I was trying to use GROUP BY.&lt;/P&gt;&lt;P&gt;If it is a similar situation, where should I use the CALCULATED key word?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Aug 2012 19:50:02 GMT</pubDate>
    <dc:creator>Nehcour0420</dc:creator>
    <dc:date>2012-08-14T19:50:02Z</dc:date>
    <item>
      <title>ERROR: The following columns were not found in the contributing tables</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-following-columns-were-not-found-in-the-contributing/m-p/93437#M977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I was trying to do something like:&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13449734391172333" jivemacro_uid="_13449734391172333" modifiedtitle="true"&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;create table work.test as&lt;/P&gt;
&lt;P&gt;select col1,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col2,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put(col3, 3.) as new_col3,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(col4) as new_col4&lt;/P&gt;
&lt;P&gt;from source_table&lt;/P&gt;
&lt;P&gt;group by col1,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col2,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col3;&lt;/P&gt;
&lt;P&gt;quit; &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I constantly got an Error: The following columns were not found in the contributing tables: new_col3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did some search and understood that this kind of error usually appears when using some calculated value in the WHERE clause and can be solved by using the key word CALCULATED.&lt;/P&gt;&lt;P&gt;I am not sure if here's the same situation when I was trying to use GROUP BY.&lt;/P&gt;&lt;P&gt;If it is a similar situation, where should I use the CALCULATED key word?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 19:50:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-following-columns-were-not-found-in-the-contributing/m-p/93437#M977</guid>
      <dc:creator>Nehcour0420</dc:creator>
      <dc:date>2012-08-14T19:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: The following columns were not found in the contributing tables</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-following-columns-were-not-found-in-the-contributing/m-p/93438#M978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you show the log with the error in it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 20:03:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-following-columns-were-not-found-in-the-contributing/m-p/93438#M978</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-08-14T20:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: The following columns were not found in the contributing tables</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-following-columns-were-not-found-in-the-contributing/m-p/93439#M979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you can group by using a column that does not exits in the select clause. You should probably use new_col3 in the group by clause, no needfor the calculated keyword.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2012 07:45:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-following-columns-were-not-found-in-the-contributing/m-p/93439#M979</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2012-08-15T07:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: The following columns were not found in the contributing tables</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-following-columns-were-not-found-in-the-contributing/m-p/93440#M980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your SQL syntax as such seems to be o.k. when used within SAS SQL (below code works). Are you sure the error is thrown by this SQL and not somewhere "downstream"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe what Linus has in mind is how SQL behaves on some data bases like Oracle. I'm always having "fun" when coding a group by there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data sample;&lt;BR /&gt;&amp;nbsp; col4=1;&lt;BR /&gt;&amp;nbsp; do col1=1 to 2;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do col2=10 to 12;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do col3=100 to 102;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; create table work.test as&amp;nbsp; &lt;BR /&gt;&amp;nbsp; select col1,&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col2,&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put(col3, 3.) as new_col3,&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(col4) as new_col4&amp;nbsp; &lt;BR /&gt;&amp;nbsp; from sample&amp;nbsp; &lt;BR /&gt;&amp;nbsp; group by col1, col2, col3;&amp;nbsp; &lt;BR /&gt;quit;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2012 10:26:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-following-columns-were-not-found-in-the-contributing/m-p/93440#M980</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-08-15T10:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: The following columns were not found in the contributing tables</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-following-columns-were-not-found-in-the-contributing/m-p/93441#M981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, I didn't have that in mind, but it was polite of you to put it that way...&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;I was jumping to the conclusion without testing...:smileyblush:, butI learned something too&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2012 10:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-following-columns-were-not-found-in-the-contributing/m-p/93441#M981</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2012-08-15T10:36:52Z</dc:date>
    </item>
  </channel>
</rss>

