<?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: duplicate value in hash table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/873118#M344985</link>
    <description>&lt;P&gt;If the data is already pre-sorted by your key then using a data step hash might not help with run-times and it also won't make your code easier to read and maintain.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And even if you would gain a bit of a performance gain I wouldn't go for mimicking a SQL left join via a data step hash unless the performance gain is really critical.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I consider for real implementation code that's easy to understand and maintain as more important than performance. I only go for more complicated better performant code over simplicity if it's really necessary.&lt;/P&gt;</description>
    <pubDate>Mon, 01 May 2023 09:03:34 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2023-05-01T09:03:34Z</dc:date>
    <item>
      <title>duplicate value in hash table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/872769#M344811</link>
      <description>&lt;P&gt;I have a problem of not converting between a join made with proc sql and the same join made with sas hash table. There is a record that is being duplicated in the sql proc, but not with the use of hashes. I give the example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data RUOLO_DANNI;
input cod_source:$2. cod_anagrafico:$9. ts_inizio_validita:datetime20.  ts_fine_validita:datetime20.;
format ts_inizio_validita ts_fine_validita datetime20.;
datalines;
1 1044576 29JUL2019:12:14:09 29JUL2019:12:14:55
1 1044576 29JUL2019:12:14:56 01JAN5999:00:00:00
1 1044576 29JUL2019:12:14:02 01JAN5999:00:00:00
;
data T_A_SOGGETTI_DN;
input cod_source:$2. cod_anagrafico:$9. cod_anagrafico_edwh:$20. ts_inizio_validita:datetime20.  ts_fine_validita:datetime20.;
format ts_inizio_validita ts_fine_validita datetime20.;
datalines;
1 1044576 F_LLSSTR03A61D612H 29JUL2019:12:14:01 01JAN5999:00:00:00
1 1044576 F_LLSSTR03A61D612H 29JUL2019:12:14:08 29JUL2019:12:14:00
;
/*SQL*/
proc sql noprint;
create table ruolo_danni_NEW as 
select RU.*,
       SO.cod_anagrafico_EDWH,
	   SO.ts_fine_validita as tsfv
from RUOLO_DANNI RU
left join T_A_SOGGETTI_DN SO
   on        
RU.cod_anagrafico = SO.cod_anagrafico
and ru.ts_inizio_validita between so.ts_inizio_validita and so.ts_fine_validita
and compress(SO.cod_source)='1';
quit;
/*HASH*/
data ruolo_danni_HASH;
set ruolo_danni;
if _n_ = 1
then do;
  length ti tf 8;
  length cod_anagrafico_edwh $20.;
  declare hash so (multidata:'y',dataset:"t_a_soggetti_dn (where=(compress(cod_source)='1') 
                            rename=(ts_inizio_validita=ti ts_fine_validita=tf))");
  so.definekey("cod_anagrafico");
  so.definedata("cod_anagrafico_edwh","ti","tf");
  so.definedone();
end;
rc = so.find();
if rc &amp;gt;= 0;
if ti le ts_inizio_validita le tf then cod_anagrafico_edwh2=cod_anagrafico_edwh; else cod_anagrafico_edwh2="";
rename cod_source2=cod_source cod_anagrafico_edwh2=cod_anagrafico_edwh;
drop rc ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 10:34:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/872769#M344811</guid>
      <dc:creator>mariopellegrini</dc:creator>
      <dc:date>2023-04-28T10:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate value in hash table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/872774#M344814</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3574"&gt;@mariopellegrini&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a look at this paper&amp;nbsp;&lt;A title="Using the SAS® Hash Object with Duplicate Key Entries" href="https://support.sas.com/resources/papers/proceedings16/10200-2016.pdf" target="_blank" rel="noopener"&gt;Using the SAS® Hash Object with Duplicate Key Entries&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;It may provide with more explanation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 10:58:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/872774#M344814</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2023-04-28T10:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate value in hash table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/872829#M344832</link>
      <description>&lt;P&gt;I tried but I can't get the result in my specific case&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 14:31:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/872829#M344832</guid>
      <dc:creator>mariopellegrini</dc:creator>
      <dc:date>2023-04-28T14:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate value in hash table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/873028#M344943</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3574"&gt;@mariopellegrini&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I tried but I can't get the result in my specific case&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That's eventually because of your use of the SQL Between Operator.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/sqlproc/n0ir3fmhicpfo7n11bfqjn471qkz.htm" target="_self"&gt;BETWEEN Operato&lt;/A&gt;r&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1682818478867.png" style="width: 724px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/83420i6AE27D6298820FF9/image-dimensions/724x22?v=v2" width="724" height="22" role="button" title="Patrick_0-1682818478867.png" alt="Patrick_0-1682818478867.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;With your sample data above statement is important. I assume the result your SQL returns is not what you intended to get.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data master;
  input m_id m_group_id:$1. m_date:datetime20.;
  format m_date datetime20.;
  datalines;
1 a 29JUL2019:12:14:09
2 a 29JUL2019:12:14:56
3 a 29JUL2019:12:14:02
;

data lookup;
  input l_id l_group_id:$1. l_start_dt:datetime20.  l_end_dt:datetime20.;
  format l_start_dt l_end_dt datetime20.;
  datalines;
1 a 29JUL2019:12:14:01 01JAN5999:00:00:00
2 a 29JUL2019:12:14:08 29JUL2019:12:14:00
;

proc sql;
    select 
      m_id,
      l_id,
      l_start_dt,
      m_date,
      l_end_dt,
      (m_date between l_start_dt and l_end_dt)      as check_logic_1,
      (m_date &amp;gt;= l_start_dt and m_date &amp;lt;= l_end_dt) as check_logic_2
    from master m
      left join lookup l
        on        
        m_group_id = l_group_id
        and m_date between l_start_dt and l_end_dt
    order by m_id, l_id
    ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_1-1682818714087.png" style="width: 597px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/83421iD335F0773F41E034/image-dimensions/597x114?v=v2" width="597" height="114" role="button" title="Patrick_1-1682818714087.png" alt="Patrick_1-1682818714087.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Assuming you don't want to select row 4 a data step version could look like below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data hashlookup_version;
  if _n_=1 then
    do;
      if _n_=1 then set lookup;
      dcl hash h1(dataset:'lookup' multidata:'y');
      h1.defineKey('l_group_id');
      h1.defineData(all:'y');
      h1.defineDone();
    end;
  call missing(of _all_);

  set master;

  do while(h1.do_over(key:strip(m_group_id))=0);
/*    if m_date &amp;gt;= l_start_dt and m_date &amp;lt;= l_end_dt then output;*/
    if l_start_dt &amp;lt;= m_date &amp;lt;= l_end_dt then output;
  end;
run;

proc print data=hashlookup_version;
  var
    m_id
    l_id
    l_start_dt
    m_date
    l_end_dt
    ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1682819772263.png" style="width: 573px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/83423i68BEC1C7D0A92870/image-dimensions/573x119?v=v2" width="573" height="119" role="button" title="Patrick_0-1682819772263.png" alt="Patrick_0-1682819772263.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 01:56:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/873028#M344943</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-04-30T01:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate value in hash table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/873043#M344947</link>
      <description>&lt;P&gt;Thanks, you were very clear.&lt;BR /&gt;I think from what you're saying that the between operator of proc sql is a bit ambiguous...&lt;BR /&gt;so to get an equivalent result equivalence I should write this code, is it correct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data hashlookup_version;
  if _n_=1 then
    do;
      if _n_=1 then set lookup;
      dcl hash h1(dataset:'lookup', multidata:'y');
      h1.defineKey('l_group_id');
      h1.defineData(all:'y');
      h1.defineDone();
    end;
  call missing(of _all_);

  set master;

  do while(h1.do_over(key:strip(m_group_id))=0);
    if (l_start_dt &amp;lt;= m_date &amp;lt;= l_end_dt) or
       (l_end_dt   &amp;lt;= m_date &amp;lt;= l_start_dt)

then output;
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Sun, 30 Apr 2023 07:30:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/873043#M344947</guid>
      <dc:creator>mariopellegrini</dc:creator>
      <dc:date>2023-04-30T07:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate value in hash table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/873046#M344949</link>
      <description>&lt;P&gt;Pretty much, yes. But I actually believe that you shouldn't be using the between operator in your SQL as it likely doesn't return the desired result.&lt;/P&gt;
&lt;P&gt;IF you want to mimic your current SQL where clause then the matching data step code should look like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ruolo_danni_NEW_hash;
  set ruolo_danni;

  if _n_ = 1 then
    do;
      length ti tf 8;
      length cod_anagrafico_edwh $20.;
      declare hash so (multidata:'y',dataset:"t_a_soggetti_dn (where=(compress(cod_source)='1') 
        rename=(ts_inizio_validita=ti ts_fine_validita=tf))");
      so.definekey("cod_anagrafico");
      so.definedata("cod_anagrafico_edwh","ti","tf");
      so.definedone();
    end;
  
  do while(so.do_over()=0);
    if 
      ( 
        ti&amp;lt;=ts_inizio_validita&amp;lt;= tf 
        or 
        tf&amp;lt;=ts_inizio_validita&amp;lt;= ti 
      ) 
      and compress(cod_source)='1'
      then
      output;
  end;

run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 30 Apr 2023 09:06:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/873046#M344949</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-04-30T09:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate value in hash table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/873074#M344960</link>
      <description>&lt;P&gt;Patrick, I've tried the code with other data and the results no longer match the sql. This conversion of sql to hash is becoming a puzzle...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data RUOLO_DANNI;
input cod_source:$2. cod_anagrafico:$9. ts_inizio_validita:datetime20.  ts_fine_validita:datetime20.;
format ts_inizio_validita ts_fine_validita datetime20.;
datalines;
1 1044576 18JUN2019:17:25:34 18JUN2019:17:25:40
1 1044576 18JUN2019:17:25:34 18JUN2019:17:25:40
1 1044576 18JUN2019:17:25:41 18JUN2019:17:38:53
;
data T_A_SOGGETTI_DN;
input cod_source:$2. cod_anagrafico:$9. cod_anagrafico_edwh:$20. ts_inizio_validita:datetime20.  ts_fine_validita:datetime20.;
format ts_inizio_validita ts_fine_validita datetime20.;
datalines;
1 1044576 F_LLSSTR03A61D612H 08APR2019:12:54:26 17JUN2019:09:49:53
1 1044576 F_LLSSTR03A61D612H 17JUN2019:09:49:54 18JUN2019:17:25:32
;
/*SQL*/
proc sql noprint;
create table ruolo_danni_SQL as 
select RU.*,
       SO.cod_anagrafico_EDWH,
	   SO.ts_fine_validita as tsfv
from RUOLO_DANNI RU
left join T_A_SOGGETTI_DN SO
   on        
RU.cod_anagrafico = SO.cod_anagrafico
and ru.ts_inizio_validita between so.ts_inizio_validita and so.ts_fine_validita
and compress(SO.cod_source)='1';
quit;
/*HASH*/
data ruolo_danni_hash;
  set ruolo_danni;

  if _n_ = 1 then
    do;
      length ti tf 8;
      length cod_anagrafico_edwh $20.;
      declare hash so (multidata:'y',dataset:"t_a_soggetti_dn (where=(compress(cod_source)='1') 
        rename=(ts_inizio_validita=ti ts_fine_validita=tf))");
      so.definekey("cod_anagrafico");
      so.definedata("cod_anagrafico_edwh","ti","tf");
      so.definedone();
    end;
  do while(so.do_over()=0);
    if 
      ( 
        ti&amp;lt;=ts_inizio_validita&amp;lt;= tf 
        or 
        tf&amp;lt;=ts_inizio_validita&amp;lt;= ti 
      ) 
      and compress(cod_source)='1'
      then
      output;
  end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 17:13:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/873074#M344960</guid>
      <dc:creator>mariopellegrini</dc:creator>
      <dc:date>2023-04-30T17:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate value in hash table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/873104#M344979</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3574"&gt;@mariopellegrini&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ah, yes... the data step code provided so far mimics an inner join. You would have to amend the logic for a left join.&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 02:00:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/873104#M344979</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-05-01T02:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate value in hash table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/873115#M344984</link>
      <description>&lt;P&gt;Okay, thanks Patrick. Now by applying the code to numerous data, the number of final rows corresponds, but I encounter 2 problems:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) the date filter doesn't seem to work, as shown by the put I inserted, from which it can be seen in the log that it doesn't print, therefore it doesn't enter the "if".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data RUOLO_DANNI;
input cod_source:$1. cod_anagrafico:$9. ts_inizio_validita:datetime20.  ts_fine_validita:datetime20.;
format ts_inizio_validita ts_fine_validita datetime20.;
datalines;
1 1044576 28JUN2019:10:57:45 28JUN2019:10:57:51
1 1044576 28JUN2019:10:57:45 28JUN2019:10:57:51
1 1044576 28JUN2019:10:57:52 28JUN2019:10:58:36
;
data T_A_SOGGETTI_DN;
input cod_source:$2. cod_anagrafico:$9. cod_anagrafico_edwh:$20. ts_inizio_validita:datetime20.  ts_fine_validita:datetime20.;
format ts_inizio_validita ts_fine_validita datetime20.;
datalines;
1 1044576 F_LLSSTR03A61D612H 12APR2019:03:32:12 29MAY2019:13:22:11
1 1044576 F_LLSSTR03A61D612H 29MAY2019:13:22:12 29MAY2019:13:22:45
;
/*SQL*/
proc sql noprint;
create table ruolo_danni_SQL as 
select RU.*,
       SO.cod_anagrafico_EDWH
from RUOLO_DANNI RU
left join T_A_SOGGETTI_DN SO
   on        
RU.cod_anagrafico = SO.cod_anagrafico
and ru.ts_inizio_validita between so.ts_inizio_validita and so.ts_fine_validita
and compress(SO.cod_source)='1';
quit;
/*HASH*/
data ruolo_danni_hash;
  set ruolo_danni;
  
  if _n_ = 1 then
    do;
      length ti tf 8;
      length cod_anagrafico_edwh $20.;
	  format ti tf datetime20.;
      declare hash so (multidata:'y',dataset:"t_a_soggetti_dn (where=(compress(cod_source)='1') 
        rename=(ts_inizio_validita=ti ts_fine_validita=tf))");
      so.definekey("cod_anagrafico");
      so.definedata("cod_anagrafico_edwh","ti","tf");
      so.definedone();
    end;
  do while(so.do_over()=0);
    if 
      ( 
        ti&amp;lt;=ts_inizio_validita&amp;lt;= tf 
        or 
        tf&amp;lt;=ts_inizio_validita&amp;lt;= ti 
      ) 
      and compress(cod_source)='1'
        then do; put cod_anagrafico=; _true_flg='1';output; end;
  end;
  if _true_flg ne '1' then output;
  drop _true_flg ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2)&amp;nbsp;the processing time compared to proc sql has increased rather than decreased (2:08.60 versus 1:56.14), it would make the conversion of this step to a hash useless:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: PROCEDURE SQL ha utilizzato (tempo totale di elaborazione):&lt;BR /&gt;real time 1:56.14&lt;BR /&gt;user cpu time 1:41.01&lt;BR /&gt;system cpu time 23.65 seconds&lt;BR /&gt;memory 9414131.15k&lt;BR /&gt;OS Memory 9432964.00k&lt;BR /&gt;Timestamp 01/05/2023 08:14:10 m.&lt;BR /&gt;Step Count 10 Switch Count 85&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;----------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).&lt;BR /&gt;NOTE: Variable ti is uninitialized.&lt;BR /&gt;NOTE: Variable tf is uninitialized.&lt;BR /&gt;NOTE: Variable cod_anagrafico_edwh is uninitialized.&lt;BR /&gt;NOTE: There were 6927902 observations read from the data set EDWH_ODS.T_A_SOGGETTI_DN.&lt;BR /&gt;WHERE COMPRESS(cod_source)='1';&lt;BR /&gt;NOTE: There were 66878514 observations read from the data set STG_VT.RUOLO_DANNI.&lt;BR /&gt;NOTE: The data set WORK.RUOLO_DANNI_HASH2 has 66878637 observations and 11 variables.&lt;BR /&gt;NOTE: DATA statement ha utilizzato (tempo totale di elaborazione):&lt;BR /&gt;real time 2:08.60&lt;BR /&gt;user cpu time 1:07.26&lt;BR /&gt;system cpu time 13.15 seconds&lt;BR /&gt;memory 1252530.56k&lt;BR /&gt;OS Memory 1275076.00k&lt;BR /&gt;Timestamp 01/05/2023 08:16:18 m.&lt;BR /&gt;Step Count 11 Switch Count 208&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 07:57:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/873115#M344984</guid>
      <dc:creator>mariopellegrini</dc:creator>
      <dc:date>2023-05-01T07:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate value in hash table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/873118#M344985</link>
      <description>&lt;P&gt;If the data is already pre-sorted by your key then using a data step hash might not help with run-times and it also won't make your code easier to read and maintain.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And even if you would gain a bit of a performance gain I wouldn't go for mimicking a SQL left join via a data step hash unless the performance gain is really critical.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I consider for real implementation code that's easy to understand and maintain as more important than performance. I only go for more complicated better performant code over simplicity if it's really necessary.&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 09:03:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/873118#M344985</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-05-01T09:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate value in hash table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/873150#M344992</link>
      <description>&lt;P&gt;OK, I agree. However, out of curiosity, I would like to understand if it is possible to arrive at an exact conversion and solve question n.1 concerning the filter on "ts_beginning_validity". I don't understand why it doesn't work&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 12:23:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/duplicate-value-in-hash-table/m-p/873150#M344992</guid>
      <dc:creator>mariopellegrini</dc:creator>
      <dc:date>2023-05-01T12:23:21Z</dc:date>
    </item>
  </channel>
</rss>

