<?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 cartesian merge with hash tables in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/cartesian-merge-with-hash-tables/m-p/71015#M20489</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I have two tables which have one common column.&lt;BR /&gt;
First table have 222874 rows and 43 columns. Second table have 4537 rows and 8 columns.&lt;BR /&gt;
Normally I use sql to merge them, you can see below:&lt;BR /&gt;
===========================================================&lt;BR /&gt;
proc sql;&lt;BR /&gt;
create table RAWDB2 as select a.*, b.linea, rskod, rsshd, rstag from lib.zH41006&lt;BR /&gt;
a, line b where a.urkod=b.urkod;&lt;BR /&gt;
===========================================================&lt;BR /&gt;
But it takes too much time. How can I use hash table for this issue.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
sinan</description>
    <pubDate>Thu, 10 Feb 2011 15:49:12 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2011-02-10T15:49:12Z</dc:date>
    <item>
      <title>cartesian merge with hash tables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/cartesian-merge-with-hash-tables/m-p/71015#M20489</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I have two tables which have one common column.&lt;BR /&gt;
First table have 222874 rows and 43 columns. Second table have 4537 rows and 8 columns.&lt;BR /&gt;
Normally I use sql to merge them, you can see below:&lt;BR /&gt;
===========================================================&lt;BR /&gt;
proc sql;&lt;BR /&gt;
create table RAWDB2 as select a.*, b.linea, rskod, rsshd, rstag from lib.zH41006&lt;BR /&gt;
a, line b where a.urkod=b.urkod;&lt;BR /&gt;
===========================================================&lt;BR /&gt;
But it takes too much time. How can I use hash table for this issue.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
sinan</description>
      <pubDate>Thu, 10 Feb 2011 15:49:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/cartesian-merge-with-hash-tables/m-p/71015#M20489</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-02-10T15:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: cartesian merge with hash tables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/cartesian-merge-with-hash-tables/m-p/71016#M20490</link>
      <description>Take a look at this paper.  It has some useful information about using duplicate keys to make SQL like joins with hash objects.&lt;BR /&gt;
&lt;BR /&gt;
support.sas.com/rnd/base/datastep/dot/better-hashing-sas92.pdf</description>
      <pubDate>Thu, 10 Feb 2011 21:01:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/cartesian-merge-with-hash-tables/m-p/71016#M20490</guid>
      <dc:creator>polingjw</dc:creator>
      <dc:date>2011-02-10T21:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: cartesian merge with hash tables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/cartesian-merge-with-hash-tables/m-p/71017#M20491</link>
      <description>Code is not test.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data result;&lt;BR /&gt;
 declare hash find(hashexp: 16);&lt;BR /&gt;
 find.definekey('urkod');&lt;BR /&gt;
 find.definedata('linea',' rskod',......);&lt;BR /&gt;
 find.definedone();&lt;BR /&gt;
&lt;BR /&gt;
 do until(last);&lt;BR /&gt;
 set line end=last;&lt;BR /&gt;
 find.add();&lt;BR /&gt;
 end;&lt;BR /&gt;
&lt;BR /&gt;
 do until(_last);&lt;BR /&gt;
 set lib.zh41006;&lt;BR /&gt;
 rc= find.find();&lt;BR /&gt;
 if rc=0 then output;&lt;BR /&gt;
 end;&lt;BR /&gt;
stop;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Fri, 18 Feb 2011 03:19:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/cartesian-merge-with-hash-tables/m-p/71017#M20491</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-02-18T03:19:54Z</dc:date>
    </item>
  </channel>
</rss>

