1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-10 14:04:36 +00:00

fix: more dedup fixes on mp_stripdiffs

This commit is contained in:
^
2024-04-30 14:04:15 +01:00
parent ed20bcaa5c
commit e6da373853
2 changed files with 14 additions and 6 deletions

10
all.sas
View File

@@ -13483,7 +13483,7 @@ create table &ds1 (drop=libref dsn) as
/* extract key values only */
%let ds2=%upcase(work.%mf_getuniquename(prefix=mpsd_pks));
create table &ds2 as
select key_hash,
select distinct key_hash,
tgtvar_nm,
tgtvar_type,
coalescec(oldval_char,newval_char) as charval,
@@ -13497,9 +13497,9 @@ create table &ds2 as
%local pk;
data _null_;
set &ds2;
by key_hash;
by key_hash processed_dttm;
call symputx('pk',catx(' ',symget('pk'),tgtvar_nm),'l');
if last.key_hash then stop;
if last.processed_dttm then stop;
run;
%let ds3=%upcase(work.%mf_getuniquename(prefix=mpsd_keychar));
@@ -13521,6 +13521,7 @@ run;
%mp_ds2squeeze(&ds3,outds=&ds3)
%mp_ds2squeeze(&ds4,outds=&ds4)
/* now merge to get all key values and de-dup */
%let ds5=%upcase(work.%mf_getuniquename(prefix=mpsd_merged));
data &ds5;
length key_hash $32 processed_dttm 8;
@@ -13528,6 +13529,9 @@ data &ds5;
by key_hash;
if not missing(key_hash);
run;
proc sort data=&ds5 nodupkey;
by &pk;
run;
/* join to base table for preliminary stage DS */
proc sql;