<?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 write Hash coding instead of update statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-Hash-coding-instead-of-update-statement/m-p/728494#M226681</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/306671"&gt;@Siva_Harish&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello Community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a query which looks like below,it is taking a more than an hour to update the dataset ds .&lt;/P&gt;
&lt;P&gt;can anyone help me to write a hash code to run fast ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; proc sql;
 update lib.ds as us
 set name=( select name from sashelp.class as g
							   where us.type= g.name
	where us.name in ( select weight from sashelp.cars)
          and us.name is null;
 quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Your example code has unbalanced quotes so I would not expect it to run at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Provide actual code. If your data set or variable names are "sensitive" then replace those bits with nonsense strings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How many records are involved in these sets? Are they actually native SAS data sets or are you connecting to another DBMS?&lt;/P&gt;</description>
    <pubDate>Tue, 23 Mar 2021 16:59:37 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-03-23T16:59:37Z</dc:date>
    <item>
      <title>How to write Hash coding instead of update statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-Hash-coding-instead-of-update-statement/m-p/728368#M226636</link>
      <description>&lt;P&gt;Hello Community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a query which looks like below,it is taking a more than an hour to update the dataset ds .&lt;/P&gt;
&lt;P&gt;can anyone help me to write a hash code to run fast ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; proc sql;
 update lib.ds as us
 set name=( select name from sashelp.class as g
							   where us.type= g.name
	where us.name in ( select weight from sashelp.cars)
          and us.name is null;
 quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Mar 2021 08:19:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-Hash-coding-instead-of-update-statement/m-p/728368#M226636</guid>
      <dc:creator>Siva_Harish</dc:creator>
      <dc:date>2021-03-23T08:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Hash coding instead of update statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-Hash-coding-instead-of-update-statement/m-p/728373#M226639</link>
      <description>&lt;P&gt;Please supply example data (data steps with datalines) for the involved datasets.&lt;/P&gt;
&lt;P&gt;With the SASHELP datasets you use, your conditions make no sense.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 09:13:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-Hash-coding-instead-of-update-statement/m-p/728373#M226639</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-03-23T09:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Hash coding instead of update statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-Hash-coding-instead-of-update-statement/m-p/728494#M226681</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/306671"&gt;@Siva_Harish&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello Community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a query which looks like below,it is taking a more than an hour to update the dataset ds .&lt;/P&gt;
&lt;P&gt;can anyone help me to write a hash code to run fast ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; proc sql;
 update lib.ds as us
 set name=( select name from sashelp.class as g
							   where us.type= g.name
	where us.name in ( select weight from sashelp.cars)
          and us.name is null;
 quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Your example code has unbalanced quotes so I would not expect it to run at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Provide actual code. If your data set or variable names are "sensitive" then replace those bits with nonsense strings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How many records are involved in these sets? Are they actually native SAS data sets or are you connecting to another DBMS?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 16:59:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-Hash-coding-instead-of-update-statement/m-p/728494#M226681</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-03-23T16:59:37Z</dc:date>
    </item>
  </channel>
</rss>

