<?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: hash equivalent of sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192575#M304872</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do not understand what your question is.&lt;/P&gt;&lt;P&gt;Your SQL looks like an inner join.&lt;/P&gt;&lt;P&gt;Are you asking how to do that with a data step?&lt;/P&gt;&lt;P&gt;Or are you asking how to force SQL to put one of the tables into memory.&amp;nbsp; If this then did you look at the SASFILE statement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 09 Mar 2014 15:28:08 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2014-03-09T15:28:08Z</dc:date>
    <item>
      <title>hash equivalent of sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192572#M304869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ladies and Gentlemen:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I join two table just like the follwoing proc sql syntax did below using data step with hash table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 12.0pt; font-family: Consolas;"&gt;&lt;STRONG&gt;proc &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; background: white; font-size: 12.0pt; font-family: Consolas;"&gt;&lt;STRONG&gt;sql &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 12pt; font-family: Consolas; color: black; background-color: white;"&gt;_method &lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 12pt; font-family: Consolas; color: blue; background-color: white;"&gt;buffersize&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 12pt; font-family: Consolas; color: black; background-color: white;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; color: teal; background: white; font-size: 12.0pt; font-family: Consolas;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 12pt; font-family: Consolas; color: black; background-color: white;"&gt;G&lt;/SPAN&gt;&lt;SPAN style="background-color: white; color: black; font-family: Consolas; font-size: 12pt; line-height: 1.5em;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 12.0pt; font-family: Consolas; color: blue; background: white;"&gt;create&lt;/SPAN&gt; &lt;SPAN style="font-size: 12.0pt; font-family: Consolas; color: blue; background: white;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: Consolas; color: black; background: white;"&gt; want &lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: Consolas; color: blue; background: white;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: Consolas; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 12.0pt; font-family: Consolas; color: blue; background: white;"&gt;select&lt;/SPAN&gt; &lt;SPAN style="font-size: 12.0pt; font-family: Consolas; color: teal; background: white;"&gt;a.&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: Consolas; color: black; background: white;"&gt;*, b.target_id&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 12.0pt; font-family: Consolas; color: blue; background: white;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: Consolas; color: black; background: white;"&gt; big_have &lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: Consolas; color: blue; background: white;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: Consolas; color: black; background: white;"&gt; a, small_have &lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: Consolas; color: blue; background: white;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: Consolas; color: black; background: white;"&gt; b&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 12.0pt; font-family: Consolas; color: blue; background: white;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: Consolas; color: black; background: white;"&gt; b.beg_date &amp;lt;= a.date &amp;lt; b.end_date &lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: Consolas; color: blue; background: white;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: Consolas; color: black; background: white;"&gt; a.id = b.id;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 12.0pt; font-family: Consolas;"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: Consolas; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2014 06:13:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192572#M304869</guid>
      <dc:creator>caveman529</dc:creator>
      <dc:date>2014-03-05T06:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: hash equivalent of sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192573#M304870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for more information pls go through this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/techsup/technote/ts553.html"&gt;http://support.sas.com/techsup/technote/ts553.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2014 08:23:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192573#M304870</guid>
      <dc:creator>TarunKumar</dc:creator>
      <dc:date>2014-03-05T08:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: hash equivalent of sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192574#M304871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Tarun.&amp;nbsp; But I hope to get at the syntax comparison....&amp;nbsp; &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Mar 2014 17:33:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192574#M304871</guid>
      <dc:creator>caveman529</dc:creator>
      <dc:date>2014-03-08T17:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: hash equivalent of sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192575#M304872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do not understand what your question is.&lt;/P&gt;&lt;P&gt;Your SQL looks like an inner join.&lt;/P&gt;&lt;P&gt;Are you asking how to do that with a data step?&lt;/P&gt;&lt;P&gt;Or are you asking how to force SQL to put one of the tables into memory.&amp;nbsp; If this then did you look at the SASFILE statement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Mar 2014 15:28:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192575#M304872</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-03-09T15:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: hash equivalent of sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192576#M304873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Tom:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the confusion.&amp;nbsp; I hope to use data step hash table to join the table instead of using proc sql because SAS report running out of disk space or sort error if I use proc sql.&amp;nbsp; The big_have table on my PC is about 500 GB.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Mar 2014 16:24:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192576#M304873</guid>
      <dc:creator>caveman529</dc:creator>
      <dc:date>2014-03-09T16:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: hash equivalent of sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192577#M304874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; want ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt; &lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; big_have small_have ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; _N_=&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;declare&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;hash&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; h(dataset:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'small_have'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;, multidata:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'y'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp; h.defineKey(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'id'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp; h.defineData(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'beg_date'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'end_date'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'target_id'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp; h.defineDone(); &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; big_have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=h.find()) &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;do&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;until&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; (h.find_next());&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; beg_date &amp;lt;= date &amp;lt;= end_date &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;drop&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; beg_date end_date ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Mar 2014 17:11:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192577#M304874</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-03-09T17:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: hash equivalent of sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192578#M304875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks!&amp;nbsp; will implement right now.&amp;nbsp; The syntax is a bit hard to understand..&amp;nbsp; Do you mind giving me some hint so that I can learn how to do it in the future.&amp;nbsp; Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Mar 2014 18:13:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192578#M304875</guid>
      <dc:creator>caveman529</dc:creator>
      <dc:date>2014-03-09T18:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: hash equivalent of sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192579#M304876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Read up on the hash object in the manual.&lt;/P&gt;&lt;P&gt;if 0 -&amp;gt; trick to get the variables defined by referencing the input tables in a SET statement that can never be executed.&lt;/P&gt;&lt;P&gt;if _N_=1 -&amp;gt; This will make sure the definition of the hash is done only once.&amp;nbsp; The definition is pretty straight forward and right out of the manual. Notice that when referencing dataset and variables in the hash commands they need to be quotes. You are basically passing the names to the hash object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Only wrinkle is that need to add the multidata tag so that it will load multiple records for the same value of the key.&lt;/P&gt;&lt;P&gt;&amp;nbsp; So this whole block will define the hash object and load the small dataset into it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The rest of the data step will loop over the values of the big datset because of the SET statement.&lt;/P&gt;&lt;P&gt;The FIND() function will check if the ID value just read from BIG is in SMALL. 0 means YES in this case.&lt;/P&gt;&lt;P&gt;The DO loop will execute and the UNTIL clause will execute the FIND_NEXT() function at the end of the loop and treat the returned value as a boolean result. Any 0 means YES there was another found, Any non zero will be taken as TRUE and cause the UNTIL() clause to end the loop.&lt;/P&gt;&lt;P&gt;The IF ... THEN OUTPUT is what decides whether this record from small matches the date from BIG.&amp;nbsp; The OUTPUT causes a row to be written. Because there is an OUTPUT no other rows will be written. (basic data step logic here).&lt;/P&gt;&lt;P&gt;The DROP is because you did not include those variables in your SQL, but they are needed in the data step so that they can be used in the IF statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Mar 2014 18:57:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192579#M304876</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-03-09T18:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: hash equivalent of sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192580#M304877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be fine to try MAGIC=103 option in PROC SQL statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Option Description&lt;/P&gt;&lt;P&gt;MAGIC=101 Influences the SQL optimizer to select the Nested Loop join algorithm.&lt;/P&gt;&lt;P&gt;MAGIC=102 Influences the SQL optimizer to select the Sort-Merge join algorithm.&lt;/P&gt;&lt;P&gt;MAGIC=103 Influences the SQL optimizer to select the Hash join algorithm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.mwsug.org/proceedings/2012/S1/MWSUG-2012-S109.pdf" title="http://www.mwsug.org/proceedings/2012/S1/MWSUG-2012-S109.pdf"&gt;http://www.mwsug.org/proceedings/2012/S1/MWSUG-2012-S109.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2014 06:29:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192580#M304877</guid>
      <dc:creator>BhavinVala</dc:creator>
      <dc:date>2014-08-22T06:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: hash equivalent of sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192581#M304878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I came across that paper before, but I thought the magic is just used in the title.&amp;nbsp; Unbeknownst to me, it is for real.&amp;nbsp; I'll try it out.&amp;nbsp; Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Aug 2014 08:52:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/hash-equivalent-of-sql/m-p/192581#M304878</guid>
      <dc:creator>caveman529</dc:creator>
      <dc:date>2014-08-23T08:52:35Z</dc:date>
    </item>
  </channel>
</rss>

