<?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 How to copy the column values from one to other? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-copy-the-column-values-from-one-to-other/m-p/144339#M38377</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to understand the SAS code to copy the column value from one to other like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume i've a table called 'one' with values like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a b&lt;/P&gt;&lt;P&gt;1 2&lt;/P&gt;&lt;P&gt;3 4&lt;/P&gt;&lt;P&gt;5 6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to copy the column values from a to b and the output should be like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a b&lt;/P&gt;&lt;P&gt;1 1&lt;/P&gt;&lt;P&gt;3 3&lt;/P&gt;&lt;P&gt;5 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest the SAS code to achieve this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Jul 2014 14:04:17 GMT</pubDate>
    <dc:creator>RamKumar</dc:creator>
    <dc:date>2014-07-31T14:04:17Z</dc:date>
    <item>
      <title>How to copy the column values from one to other?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-copy-the-column-values-from-one-to-other/m-p/144339#M38377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to understand the SAS code to copy the column value from one to other like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume i've a table called 'one' with values like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a b&lt;/P&gt;&lt;P&gt;1 2&lt;/P&gt;&lt;P&gt;3 4&lt;/P&gt;&lt;P&gt;5 6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to copy the column values from a to b and the output should be like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a b&lt;/P&gt;&lt;P&gt;1 1&lt;/P&gt;&lt;P&gt;3 3&lt;/P&gt;&lt;P&gt;5 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest the SAS code to achieve this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2014 14:04:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-copy-the-column-values-from-one-to-other/m-p/144339#M38377</guid>
      <dc:creator>RamKumar</dc:creator>
      <dc:date>2014-07-31T14:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy the column values from one to other?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-copy-the-column-values-from-one-to-other/m-p/144340#M38378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I assume b in the second table is b from the first table - 1 so:&lt;/P&gt;&lt;P&gt;data want (rename=(new_b=b));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new_b=b-1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2014 14:16:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-copy-the-column-values-from-one-to-other/m-p/144340#M38378</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-07-31T14:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy the column values from one to other?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-copy-the-column-values-from-one-to-other/m-p/144341#M38379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think we shoud assign value of vara to&amp;nbsp; varb&amp;nbsp; just like this&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt; set have;&lt;/P&gt;&lt;P&gt;b=a;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 02:19:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-copy-the-column-values-from-one-to-other/m-p/144341#M38379</guid>
      <dc:creator>hello_fj</dc:creator>
      <dc:date>2014-08-01T02:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy the column values from one to other?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-copy-the-column-values-from-one-to-other/m-p/491575#M72180</link>
      <description>&lt;P&gt;If A and B column both are in same table then you can try following code :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data want;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;set have;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;array new{1} a;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;b = sum(of new{*});&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;P.S. : I don't think its a proper way to copy columns though!&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2018 09:46:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-copy-the-column-values-from-one-to-other/m-p/491575#M72180</guid>
      <dc:creator>ShreyasTare</dc:creator>
      <dc:date>2018-08-31T09:46:51Z</dc:date>
    </item>
  </channel>
</rss>

