<?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: How to go about Merging data sets with different variable names but with similar data. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-go-about-Merging-data-sets-with-different-variable-names/m-p/868141#M342911</link>
    <description>&lt;P&gt;Instead of merging, stack the datasets and rename the "common" variables:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
length ds dsname $41;
set
  mycovid.ocovid
  mycovid.ocwwp (rename=(sample_date=date wwtp_name=area))
  indsname=ds
;
dsname = ds;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The additional variable dsname will contain the source.&lt;/P&gt;</description>
    <pubDate>Wed, 05 Apr 2023 06:38:02 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2023-04-05T06:38:02Z</dc:date>
    <item>
      <title>How to go about Merging data sets with different variable names but with similar data.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-go-about-Merging-data-sets-with-different-variable-names/m-p/868139#M342909</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I merged two data sets (covid) and (ocwwp) and produced table below. My problem is that I have 2 "dates" variables (covid) is "date" and (ocwwp) is "Sample_date". Additionally I have a location variable that are (covid) is "area" and (ocwwp) is "Wwtp_Name" and they both have the "Orange" observation. I basically to use the dates data from both (covid) and (ocwwp) for a time series graph with my "case" and "concentration" variable. But I guess I just dont know how to go about it now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I just make my date variables into 1 variable?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is my code how I merged the data&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data pmerge;
merge mycovid.ocovid
	  mycovid.ocwwp;
run;
	&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-04-04 at 11.10.00 PM.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82333iCC352F14507E57A0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-04-04 at 11.10.00 PM.png" alt="Screenshot 2023-04-04 at 11.10.00 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 06:22:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-go-about-Merging-data-sets-with-different-variable-names/m-p/868139#M342909</guid>
      <dc:creator>rebelde52</dc:creator>
      <dc:date>2023-04-05T06:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to go about Merging data sets with different variable names but with similar data.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-go-about-Merging-data-sets-with-different-variable-names/m-p/868141#M342911</link>
      <description>&lt;P&gt;Instead of merging, stack the datasets and rename the "common" variables:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
length ds dsname $41;
set
  mycovid.ocovid
  mycovid.ocwwp (rename=(sample_date=date wwtp_name=area))
  indsname=ds
;
dsname = ds;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The additional variable dsname will contain the source.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 06:38:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-go-about-Merging-data-sets-with-different-variable-names/m-p/868141#M342911</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-04-05T06:38:02Z</dc:date>
    </item>
  </channel>
</rss>

