<?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 Two Tables with complex conditions in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631862#M21001</link>
    <description>&lt;P&gt;You problem is that you do not have proper identification for observations. For "Paul", you have three absolutely identical observations in tablea. How would you then select anything but the same observation from tableb if you search for the closest one?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or should you first go and deduplicate tablea by name, weight and date?&lt;/P&gt;</description>
    <pubDate>Fri, 13 Mar 2020 13:54:43 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-03-13T13:54:43Z</dc:date>
    <item>
      <title>Merging Two Tables with complex conditions</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631827#M20996</link>
      <description>&lt;P&gt;To start, I have two sets of data that I would like to join&amp;nbsp;&lt;EM&gt;as close to 1 to 1 as possible&lt;/EM&gt; on 3 total criteria.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) A.FIRST_NAME = B.FIRST_NAME&lt;/P&gt;&lt;P&gt;2) A.WEIGHT=B.WEIGHT&lt;/P&gt;&lt;P&gt;3) 0&amp;lt;= INTCK('DAY',A.WEIGHT,B.WEIGHT)&amp;lt;12&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I were to write this in a program currently, it would look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA WORK.TABLEA;&lt;BR /&gt;INPUT PERSON_ID FIRST_NAME $ WEIGHT DATE DATE9.;&lt;BR /&gt;FORMAT DATE DATE9.;&lt;BR /&gt;CARDS;&lt;BR /&gt;1 PAUL 185 17JAN2020&lt;BR /&gt;2 JOHN 205 05JAN2020&lt;BR /&gt;3 KEVIN 180 01FEB2020&lt;BR /&gt;4 PAUL 185 17JAN2020&lt;BR /&gt;5 PAUL 185 17JAN2020&lt;BR /&gt;6 JOHN 221 25JAN2020&lt;BR /&gt;7 BEN 176 13FEB2020&lt;BR /&gt;8 PAUL 185 21JAN2020&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;DATA WORK.TABLEB;&lt;BR /&gt;INPUT HEIGHT_ID FIRST_NAME $ WEIGHT DATE DATE9.;&lt;BR /&gt;FORMAT DATE DATE9.;&lt;BR /&gt;CARDS;&lt;BR /&gt;1 PAUL 185 18JAN2020&lt;BR /&gt;2 PAUL 185 20JAN2020&lt;BR /&gt;3 KEVIN 190 02FEB2020&lt;BR /&gt;4 KEVIN 180 05FEB2020&lt;BR /&gt;5 JOHN 205 06JAN2020&lt;BR /&gt;6 PAUL 185 21JAN2020&lt;BR /&gt;7 BEN 176 15FEB2020&lt;BR /&gt;8 PAUL 185 23JAN2020&lt;BR /&gt;9 BEN 180 01MAR2020&lt;BR /&gt;10 JOHN 205 10JAN2020&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;/P&gt;&lt;P&gt;CREATE TABLE WORK.MERGED_TABLE AS SELECT&amp;nbsp;&lt;/P&gt;&lt;P&gt;A.*,&lt;/P&gt;&lt;P&gt;B.HEIGHT_ID,&lt;/P&gt;&lt;P&gt;INTCK('DAY',A.DATE,B.DATE) AS DATEDIF&lt;/P&gt;&lt;P&gt;FROM TABLEA A&lt;/P&gt;&lt;P&gt;LEFT JOIN TABLEB B&lt;/P&gt;&lt;P&gt;ON A.FIRST_NAME = B.FIRST_NAME&lt;/P&gt;&lt;P&gt;AND A.WEIGHT = B.WEIGHT&lt;/P&gt;&lt;P&gt;AND&amp;nbsp;0&amp;lt;= INTCK('DAY',A.DATE,B.DATE)&amp;lt;12&lt;/P&gt;&lt;P&gt;ORDER BY A.PERSON_ID, DATEDIF;&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SORT DATA=WORK.MERGED_TABLE NODUPKEY; BY PERSON_ID; RUN;&lt;/P&gt;&lt;P&gt;PROC SORT DATA=WORK.MERGED_TABLE NODUPKEY; BY HEIGHT_ID; RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My above program doesn't give me the exact desired output even, since deduping on both IDs just ends up returning 5 values, but it would be something like that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I essentially want SAS to choose the best join (based on lowest date difference with the other 2 criteria matching) and then stop evaluating BOTH lines (from table A and B) in any future joins.&amp;nbsp; In current state, it is evaluating every line in table A against every line in table B.&amp;nbsp; Even with an inner join and adding a step to left join back to Table A later, it is still extremely inefficient and sometimes just does not work.&amp;nbsp; I have not done true SAS merges before, and any example I have seen has not had a sort of "flexible" join criteria.&amp;nbsp; Thank you for any help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36836i6705984141320BEB/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 12:46:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631827#M20996</guid>
      <dc:creator>lawatkey</dc:creator>
      <dc:date>2020-03-13T12:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two Tables with complex conditions</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631844#M20998</link>
      <description>&lt;P&gt;WEIGHT is not a date, so using intck() on it does not make sense.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 13:12:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631844#M20998</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-13T13:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two Tables with complex conditions</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631850#M20999</link>
      <description>I had a typo in the code I edited earlier, that was meant to be the date, not weight</description>
      <pubDate>Fri, 13 Mar 2020 13:29:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631850#M20999</guid>
      <dc:creator>lawatkey</dc:creator>
      <dc:date>2020-03-13T13:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two Tables with complex conditions</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631862#M21001</link>
      <description>&lt;P&gt;You problem is that you do not have proper identification for observations. For "Paul", you have three absolutely identical observations in tablea. How would you then select anything but the same observation from tableb if you search for the closest one?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or should you first go and deduplicate tablea by name, weight and date?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 13:54:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631862#M21001</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-13T13:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two Tables with complex conditions</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631864#M21002</link>
      <description>The unique "key" here is the Person ID. I am showing this example specifically because my actual data is transaction based, where you can have someone making the same sort of transaction 5 times in a row (10 dollars at a grocery store, from the same card, 5 times in that day), so while the transactions can LOOK identical, they are unique, based on their special key, which is the Person_ID in this example.</description>
      <pubDate>Fri, 13 Mar 2020 14:00:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631864#M21002</guid>
      <dc:creator>lawatkey</dc:creator>
      <dc:date>2020-03-13T14:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two Tables with complex conditions</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631874#M21003</link>
      <description>&lt;P&gt;Then you would need to join on this unique key, but the person_id and height_id do not match with regard to the names.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically, you have multiple Paul-185-17jan2020 entries in A, and multiple entries for Paul-185 in B where the date fulfills your condition, so you will invariably get a cartesian join if you cannot specify an additional condition.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 14:16:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631874#M21003</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-13T14:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two Tables with complex conditions</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631882#M21004</link>
      <description>&lt;P&gt;&amp;nbsp;Is there no way to do a "best case scenario" join for Person_ID 1 (if one exists), then stop evaluating Person_ID 1 and whatever Height ID it matched to?&amp;nbsp; In this case Height ID 1.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So have SAS look at Person_ID1 and find a best match in all of table B, if one exists.&amp;nbsp; In this case it is Height_ID 1.&lt;/P&gt;&lt;P&gt;Next, have SAS look at Person_ID2 and find a best match in all of table B&amp;nbsp;&lt;STRONG&gt;EXCEPT Height_ID1&lt;/STRONG&gt;, if one exists.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Repeat until done.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 14:30:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631882#M21004</guid>
      <dc:creator>lawatkey</dc:creator>
      <dc:date>2020-03-13T14:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two Tables with complex conditions</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631894#M21005</link>
      <description>&lt;P&gt;OK, so now we have an algorithm that we can try to cast into code.&lt;/P&gt;
&lt;P&gt;See this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set tablea;
height_id = .;
if _n_ = 1
then do;
  declare hash b (dataset:"tableb (rename=(date=b_date))");
  b.definekey("first_name","weight","b_date");
  b.definedata("height_id");
  b.definedone();
end;
b_date = date;
rc = b.find();
do while (rc ne 0 and b_date &amp;lt; date + 12);
  b_date + 1;
  rc = b.find();
end;
if rc = 0
then do;
  datdif = b_date - date;
  rc = b.remove();
end;
drop rc b_date;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The result is this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="dgrid_17-row-0" class=" dgrid-row dgrid-row-even ui-state-default dgrid-selected ui-state-active" role="row"&gt;
&lt;TABLE class="dgrid-row-table" role="presentation"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-0 field-col0 obsNumCell"&gt;1&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-1 field-col1 dgrid-focus"&gt;1&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-2 field-col2"&gt;PAUL&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-3 field-col3"&gt;185&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-4 field-col4"&gt;17JAN2020&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-5 field-col5"&gt;1&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-6 field-col6"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;DIV id="dgrid_17-row-1" class=" dgrid-row dgrid-row-odd ui-state-default" role="row"&gt;
&lt;TABLE class="dgrid-row-table" role="presentation"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-0 field-col0 obsNumCell"&gt;2&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-1 field-col1"&gt;2&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-2 field-col2"&gt;JOHN&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-3 field-col3"&gt;205&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-4 field-col4"&gt;05JAN2020&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-5 field-col5"&gt;5&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-6 field-col6"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;DIV id="dgrid_17-row-2" class=" dgrid-row dgrid-row-even ui-state-default" role="row"&gt;
&lt;TABLE class="dgrid-row-table" role="presentation"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-0 field-col0 obsNumCell"&gt;3&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-1 field-col1"&gt;3&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-2 field-col2"&gt;KEVIN&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-3 field-col3"&gt;180&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-4 field-col4"&gt;01FEB2020&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-5 field-col5"&gt;4&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-6 field-col6"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;DIV id="dgrid_17-row-3" class=" dgrid-row dgrid-row-odd ui-state-default" role="row"&gt;
&lt;TABLE class="dgrid-row-table" role="presentation"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-0 field-col0 obsNumCell"&gt;4&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-1 field-col1"&gt;4&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-2 field-col2"&gt;PAUL&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-3 field-col3"&gt;185&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-4 field-col4"&gt;17JAN2020&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-5 field-col5"&gt;2&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-6 field-col6"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;DIV id="dgrid_17-row-4" class=" dgrid-row dgrid-row-even ui-state-default" role="row"&gt;
&lt;TABLE class="dgrid-row-table" role="presentation"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-0 field-col0 obsNumCell"&gt;5&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-1 field-col1"&gt;5&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-2 field-col2"&gt;PAUL&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-3 field-col3"&gt;185&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-4 field-col4"&gt;17JAN2020&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-5 field-col5"&gt;6&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-6 field-col6"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;DIV id="dgrid_17-row-5" class=" dgrid-row dgrid-row-odd ui-state-default" role="row"&gt;
&lt;TABLE class="dgrid-row-table" role="presentation"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-0 field-col0 obsNumCell"&gt;6&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-1 field-col1"&gt;6&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-2 field-col2"&gt;JOHN&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-3 field-col3"&gt;221&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-4 field-col4"&gt;25JAN2020&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-5 field-col5"&gt;.&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-6 field-col6"&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;DIV id="dgrid_17-row-6" class=" dgrid-row dgrid-row-even ui-state-default" role="row"&gt;
&lt;TABLE class="dgrid-row-table" role="presentation"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-0 field-col0 obsNumCell"&gt;7&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-1 field-col1"&gt;7&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-2 field-col2"&gt;BEN&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-3 field-col3"&gt;176&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-4 field-col4"&gt;13FEB2020&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-5 field-col5"&gt;7&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-6 field-col6"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;DIV id="dgrid_17-row-7" class=" dgrid-row ui-state-default dgrid-row-odd" role="row"&gt;
&lt;TABLE class="dgrid-row-table" role="presentation"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-0 field-col0 obsNumCell"&gt;8&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-1 field-col1"&gt;8&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-2 field-col2"&gt;PAUL&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-3 field-col3"&gt;185&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-4 field-col4"&gt;21JAN2020&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-5 field-col5"&gt;8&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-6 field-col6"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can't have height_id 6 in the last observation, as this was already used in observation 5.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 13 Mar 2020 14:59:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631894#M21005</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-13T14:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two Tables with complex conditions</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631952#M21019</link>
      <description>&lt;P&gt;I still have so much to learn about SAS... I can sort of understand the logic but it's nothing I've ever used before... I applied it to my real code and it worked wonderfully.&amp;nbsp; Not only did it work, but it is FAST, less than a minute to jam 2-300k rows into 120 million.&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;you are one smart guy, thank you so much!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 16:24:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631952#M21019</guid>
      <dc:creator>lawatkey</dc:creator>
      <dc:date>2020-03-13T16:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two Tables with complex conditions</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631980#M21028</link>
      <description>&lt;P&gt;The hash object is one of the most useful tools SAS has ever given us; it is worth every minute of learning you put into it.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 17:04:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-Two-Tables-with-complex-conditions/m-p/631980#M21028</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-13T17:04:30Z</dc:date>
    </item>
  </channel>
</rss>

