<?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: Merging data of different files by matching date and name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Merging-data-of-different-files-by-matching-date-and-name/m-p/360531#M274664</link>
    <description>How can I do that?</description>
    <pubDate>Mon, 22 May 2017 19:35:34 GMT</pubDate>
    <dc:creator>aminkarimid</dc:creator>
    <dc:date>2017-05-22T19:35:34Z</dc:date>
    <item>
      <title>Merging data of different files by matching date and name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-data-of-different-files-by-matching-date-and-name/m-p/360528#M274662</link>
      <description>&lt;P&gt;Hello everybody;&lt;BR /&gt;I have two tables. One of them is in excel and the other one is in access. The excel file has name, date and volume1 variables. The access file has name, date and volume2 variables. I want to merge them by name &amp;amp; date. In other word, I want that SAS find the same date and name, and then merge volume1 &amp;amp; volume 2 variables. There is missing data in the excel file.&lt;/P&gt;&lt;P&gt;How can I do that?&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 19:46:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-data-of-different-files-by-matching-date-and-name/m-p/360528#M274662</guid>
      <dc:creator>aminkarimid</dc:creator>
      <dc:date>2017-05-22T19:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Merging data of different files by matching date and name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-data-of-different-files-by-matching-date-and-name/m-p/360529#M274663</link>
      <description>&lt;P&gt;I'd have to say it's not clear to me the point of your question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a simple MERGE in SAS, do you have a more detailed problem description?&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 19:31:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-data-of-different-files-by-matching-date-and-name/m-p/360529#M274663</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-05-22T19:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Merging data of different files by matching date and name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-data-of-different-files-by-matching-date-and-name/m-p/360531#M274664</link>
      <description>How can I do that?</description>
      <pubDate>Mon, 22 May 2017 19:35:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-data-of-different-files-by-matching-date-and-name/m-p/360531#M274664</guid>
      <dc:creator>aminkarimid</dc:creator>
      <dc:date>2017-05-22T19:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Merging data of different files by matching date and name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-data-of-different-files-by-matching-date-and-name/m-p/360532#M274665</link>
      <description>&lt;P&gt;I am asking for a much more detailed statement of what you want to do AND what you are having a problem with.&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 19:48:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-data-of-different-files-by-matching-date-and-name/m-p/360532#M274665</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-05-22T19:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Merging data of different files by matching date and name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-data-of-different-files-by-matching-date-and-name/m-p/360545#M274666</link>
      <description>&lt;P&gt;Post the datasets (as datasteps!) after import, so we can work with real data. Just enough observations to illustrate the issue.&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 20:09:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-data-of-different-files-by-matching-date-and-name/m-p/360545#M274666</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-05-22T20:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Merging data of different files by matching date and name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-data-of-different-files-by-matching-date-and-name/m-p/360573#M274667</link>
      <description>&lt;P&gt;I have two tables.&lt;/P&gt;&lt;P&gt;Table01:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;date name time volume1 intraday&lt;BR /&gt;24/03/2008 abc 10:00 100 .&lt;BR /&gt;24/03/2008 abc 10:00 120 .&lt;BR /&gt;24/03/2008 abc 10:00 100 320&lt;BR /&gt;24/03/2008 abc 11:00 200 .&lt;BR /&gt;24/03/2008 abc 11:00 250 450&lt;BR /&gt;24/03/2008 abc 12:30 110 .&lt;BR /&gt;24/03/2008 abc 12:30 120 230&lt;BR /&gt;24/03/2008 xyz 09:30 250 .&lt;BR /&gt;24/03/2008 xyz 09:30 240 .&lt;BR /&gt;24/03/2008 xyz 09:30 170 660&lt;BR /&gt;24/03/2008 xyz 10:00 180 .&lt;BR /&gt;24/03/2008 xyz 10:00 140 .&lt;BR /&gt;24/03/2008 xyz 10:00 110 430&lt;BR /&gt;24/03/2008 xyz 12:00 90 90&lt;BR /&gt;25/03/2008 abc 09:30 110 .&lt;BR /&gt;25/03/2008 abc 09:30 210 .&lt;BR /&gt;25/03/2008 abc 09:30 100 420&lt;BR /&gt;25/03/2008 abc 10:00 100 100&lt;BR /&gt;25/03/2008 abc 11:00 210 .&lt;BR /&gt;25/03/2008 abc 11:00 220 .&lt;BR /&gt;25/03/2008 abc 11:00 260 690&lt;BR /&gt;25/03/2008 asdf 11:00 150&lt;BR /&gt;25/03/2008 asdf 11:00 100 250&lt;BR /&gt;25/03/2008 asdf 12:30 110 .&lt;BR /&gt;25/03/2008 asdf 12:30 200 .&lt;BR /&gt;25/03/2008 asdf 12:30 260 570&lt;BR /&gt;25/03/2008 xyz 09:00 300 300&lt;BR /&gt;25/03/2008 xyz 09:30 250 .&lt;BR /&gt;25/03/2008 xyz 09:30 170 .&lt;BR /&gt;25/03/2008 xyz 09:30 170 590&lt;BR /&gt;25/03/2008 xyz 11:30 200 200&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table02:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;date name Trade volume2&lt;BR /&gt;24-Mar-2008 abc 10 1000&lt;BR /&gt;24-Mar-2008 asd 20 1180&lt;BR /&gt;24-Mar-2008 xyz 15 1500&lt;BR /&gt;24-Mar-2008 qwe 30 2000&lt;BR /&gt;25-Mar-2008 zxc 10 900&lt;BR /&gt;25-Mar-2008 abc 15 1210&lt;BR /&gt;25-Mar-2008 xyz 25 1090&lt;BR /&gt;25-Mar-2008 fgh 15 1340&lt;BR /&gt;26-Mar-2008 abc 12 1250&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to merge data such as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table03:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;date name time volume1 intraday volume2&lt;BR /&gt;24/03/2008 abc 10:00 100 . .&lt;BR /&gt;24/03/2008 abc 10:00 120 . .&lt;BR /&gt;24/03/2008 abc 10:00 100 320 .&lt;BR /&gt;24/03/2008 abc 11:00 200 . .&lt;BR /&gt;24/03/2008 abc 11:00 250 450 .&lt;BR /&gt;24/03/2008 abc 12:30 110 . .&lt;BR /&gt;24/03/2008 abc 12:30 120 230 1000&lt;BR /&gt;24/03/2008 xyz 09:30 250 . .&lt;BR /&gt;24/03/2008 xyz 09:30 240 . .&lt;BR /&gt;24/03/2008 xyz 09:30 170 660 .&lt;BR /&gt;24/03/2008 xyz 10:00 180 . .&lt;BR /&gt;24/03/2008 xyz 10:00 140 . .&lt;BR /&gt;24/03/2008 xyz 10:00 110 430 .&lt;BR /&gt;24/03/2008 xyz 12:00 90 90 1180&lt;BR /&gt;25/03/2008 abc 09:30 110 . .&lt;BR /&gt;25/03/2008 abc 09:30 210 . .&lt;BR /&gt;25/03/2008 abc 09:30 100 420 .&lt;BR /&gt;25/03/2008 abc 10:00 100 100 .&lt;BR /&gt;25/03/2008 abc 11:00 210 . .&lt;BR /&gt;25/03/2008 abc 11:00 220 . .&lt;BR /&gt;25/03/2008 abc 11:00 260 690 1210&lt;BR /&gt;25/03/2008 xyz 09:00 300 300 .&lt;BR /&gt;25/03/2008 xyz 09:30 250 . .&lt;BR /&gt;25/03/2008 xyz 09:30 170 . .&lt;BR /&gt;25/03/2008 xyz 09:30 170 590 .&lt;BR /&gt;25/03/2008 xyz 11:30 200 200 1090&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I make the table03 by merging data?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 22:06:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-data-of-different-files-by-matching-date-and-name/m-p/360573#M274667</guid>
      <dc:creator>aminkarimid</dc:creator>
      <dc:date>2017-05-22T22:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Merging data of different files by matching date and name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-data-of-different-files-by-matching-date-and-name/m-p/360589#M274668</link>
      <description>&lt;P&gt;Do you have issues with importing the two tables into SAS ?&lt;/P&gt;
&lt;P&gt;What variable type are the dates in both tables? are they sas dates or sas datetime? or character type?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suppose no - then sort the tables if need then just merge them:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=table01; by date name; run;
proc sort data=table02; by date name; run;

data want;
 merge table01 table02;
   by date name;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you have more issues post your full log.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 00:19:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-data-of-different-files-by-matching-date-and-name/m-p/360589#M274668</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-05-23T00:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Merging data of different files by matching date and name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-data-of-different-files-by-matching-date-and-name/m-p/360619#M274669</link>
      <description>&lt;P&gt;These are not datasteps that read data from datalines, so we still have no idea what types the variables are and what formats are used.&lt;/P&gt;
&lt;P&gt;The Excel file is also useless to convey that information.&lt;/P&gt;
&lt;P&gt;PLEASE POST YOUR DATA AS DATASTEPS WITH DATALINES.&lt;/P&gt;
&lt;P&gt;I hope that was clear enough now.&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 04:50:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-data-of-different-files-by-matching-date-and-name/m-p/360619#M274669</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-05-23T04:50:31Z</dc:date>
    </item>
  </channel>
</rss>

