fix: updating logic for REPLACE loadtype
Build / Build-and-ng-test (pull_request) Successful in 24s Details

Staged rows are always considered as NEW, and previous rows are considered DELETED
This is consistent with the fact that REPLACE involves a delete *, followed by an append.
This commit is contained in:
Allan 2023-08-25 12:17:43 +01:00
parent 413acf7d05
commit 1f2ce55f24
1 changed files with 7 additions and 3 deletions

View File

@ -142,10 +142,14 @@ run;
%mp_lockanytable(UNLOCK,lib=&lib,ds=&ds,ctl_ds=&dclib..mpe_lockanytable)
%end;
%else %do;
/* is full replace so treat everything as a mod in diff screen */
data work.outds_mod work.outds_add work.outds_del;
/* is full replace so treat all staged records as new in diff screen */
data work.outds_mod work.outds_add ;
set work.&staging_ds;
output work.outds_mod; /* _add and _del will be empty */
output work.outds_add;
run;
/* previous table will be considered fully deleted */
data work.outds_del;
set &lib..&ds;
run;
%end;
%end;