<?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 set same value to all cells - proc sql in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/set-same-value-to-all-cells-proc-sql/m-p/181065#M46122</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp; I'm merging 2 tables in proc sql and I want the new&amp;nbsp; table to have a forced value in one field.&lt;/P&gt;&lt;P&gt;So mergin Table A and Table B to create Table C, and I want to force a field called MG_typ found in Table A to be all = 'Residential'.. how can I do that..&lt;/P&gt;&lt;P&gt;similar to simply assigning MG_typ = 'Residential' in base SAS.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Oct 2014 19:15:55 GMT</pubDate>
    <dc:creator>podarum</dc:creator>
    <dc:date>2014-10-10T19:15:55Z</dc:date>
    <item>
      <title>set same value to all cells - proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/set-same-value-to-all-cells-proc-sql/m-p/181065#M46122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp; I'm merging 2 tables in proc sql and I want the new&amp;nbsp; table to have a forced value in one field.&lt;/P&gt;&lt;P&gt;So mergin Table A and Table B to create Table C, and I want to force a field called MG_typ found in Table A to be all = 'Residential'.. how can I do that..&lt;/P&gt;&lt;P&gt;similar to simply assigning MG_typ = 'Residential' in base SAS.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 19:15:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/set-same-value-to-all-cells-proc-sql/m-p/181065#M46122</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2014-10-10T19:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: set same value to all cells - proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/set-same-value-to-all-cells-proc-sql/m-p/181066#M46123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use Case statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 19:43:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/set-same-value-to-all-cells-proc-sql/m-p/181066#M46123</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-10-10T19:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: set same value to all cells - proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/set-same-value-to-all-cells-proc-sql/m-p/181067#M46124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depends on if the variable exists in the other table at all or in both already. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If in neither table then the following will work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select 'Residential' as MG_typ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's missing in all of table B, but present in All of Table A you could use the coalesce function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select coalesce(MG_type, "Residential") as MG_Type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise some sort of Case Statement is required. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 19:59:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/set-same-value-to-all-cells-proc-sql/m-p/181067#M46124</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-10-10T19:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: set same value to all cells - proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/set-same-value-to-all-cells-proc-sql/m-p/181068#M46125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Reeza&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 20:08:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/set-same-value-to-all-cells-proc-sql/m-p/181068#M46125</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2014-10-10T20:08:32Z</dc:date>
    </item>
  </channel>
</rss>

