<?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 SQL Create Table - creating a new column by adding several columns in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-Create-Table-creating-a-new-column-by-adding-several/m-p/70796#M7080</link>
    <description>That did it. Some of the Net Amount fields were null/blank '.' &lt;BR /&gt;
&lt;BR /&gt;
The new code of &lt;BR /&gt;
&lt;BR /&gt;
SUM(CALCULATED Disb_1_Net_Amount,CALCULATED Disb_2_Net_Amount, CALCULATED Disb_3_Net_Amount,CALCULATED Disb_4_Net_Amount)	FORMAT=DOLLAR17.2 AS Total_Disb_Net_Amount,&lt;BR /&gt;
&lt;BR /&gt;
works like a charm. Thank you.</description>
    <pubDate>Wed, 08 Sep 2010 20:56:20 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-09-08T20:56:20Z</dc:date>
    <item>
      <title>Proc SQL Create Table - creating a new column by adding several columns</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-Create-Table-creating-a-new-column-by-adding-several/m-p/70794#M7078</link>
      <description>I have been given an EG process flow to maintain, and one of the code segments creates a work table by formatting character data from an input file. I need to create a new column in this table by adding 4 dollar fields to get the value for the new column. &lt;BR /&gt;
&lt;BR /&gt;
I don't get any errors, but I don't get any output in the new column either (data column shows '.'). My code is:&lt;BR /&gt;
&lt;BR /&gt;
(Input(put(&amp;amp;importfilename..Disb_1_Net_Amt,$8.),17.2)) FORMAT=DOLLAR17.2 AS Disb_1_Net_Amount,&lt;BR /&gt;
	(Input(put(&amp;amp;importfilename..Disb_2_Net_Amt,$8.),17.2)) FORMAT=DOLLAR17.2 AS Disb_2_Net_Amount,&lt;BR /&gt;
	(Input(put(&amp;amp;importfilename..Disb_3_Net_Amt,$8.),17.2)) FORMAT=DOLLAR17.2 AS Disb_3_Net_Amount,&lt;BR /&gt;
	(Input(put(&amp;amp;importfilename..Disb_4_Net_Amt,$8.),17.2)) FORMAT=DOLLAR17.2 AS Disb_4_Net_Amount,&lt;BR /&gt;
&lt;BR /&gt;
/* new column */&lt;BR /&gt;
	((CALCULATED Disb_1_Net_Amount) + (CALCULATED Disb_2_Net_Amount)&lt;BR /&gt;
	+ (CALCULATED Disb_3_Net_Amount) + (CALCULATED Disb_4_Net_Amount))&lt;BR /&gt;
		FORMAT=DOLLAR17.2 AS Total_Disb_Net_Amount,&lt;BR /&gt;
&lt;BR /&gt;
What am I doing wrong?  Thanks.</description>
      <pubDate>Wed, 08 Sep 2010 18:30:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-Create-Table-creating-a-new-column-by-adding-several/m-p/70794#M7078</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-09-08T18:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL Create Table - creating a new column by adding several columns</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-Create-Table-creating-a-new-column-by-adding-several/m-p/70795#M7079</link>
      <description>Does your query show data in the ...Net_Amount fields?  Are they all there?&lt;BR /&gt;
&lt;BR /&gt;
One possibility:&lt;BR /&gt;
By using the "+" operator, if any of the component parts are missing, the result is missing.  If you have missing pieces and the sum is still meaningful, use the SUM function to add them up.</description>
      <pubDate>Wed, 08 Sep 2010 20:12:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-Create-Table-creating-a-new-column-by-adding-several/m-p/70795#M7079</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2010-09-08T20:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL Create Table - creating a new column by adding several columns</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-Create-Table-creating-a-new-column-by-adding-several/m-p/70796#M7080</link>
      <description>That did it. Some of the Net Amount fields were null/blank '.' &lt;BR /&gt;
&lt;BR /&gt;
The new code of &lt;BR /&gt;
&lt;BR /&gt;
SUM(CALCULATED Disb_1_Net_Amount,CALCULATED Disb_2_Net_Amount, CALCULATED Disb_3_Net_Amount,CALCULATED Disb_4_Net_Amount)	FORMAT=DOLLAR17.2 AS Total_Disb_Net_Amount,&lt;BR /&gt;
&lt;BR /&gt;
works like a charm. Thank you.</description>
      <pubDate>Wed, 08 Sep 2010 20:56:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-Create-Table-creating-a-new-column-by-adding-several/m-p/70796#M7080</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-09-08T20:56:20Z</dc:date>
    </item>
  </channel>
</rss>

