diff --git a/sas/sasjs/services/hooks/mpe_tables_postedit.sas b/sas/sasjs/services/hooks/mpe_tables_postedit.sas index d5dbe27..6a9c754 100644 --- a/sas/sasjs/services/hooks/mpe_tables_postedit.sas +++ b/sas/sasjs/services/hooks/mpe_tables_postedit.sas @@ -23,8 +23,11 @@ /* ensure uppercasing */ data work.staging_ds; set work.staging_ds; - LIBREF=upcase(LIBREF); - DSN=upcase(DSN); + /* PK fields should not be upcased if we are trying to delete records */ + if upcase(_____DELETE__THIS__RECORD_____) ne "YES" then do; + LIBREF=upcase(LIBREF); + DSN=upcase(DSN); + end; loadtype=upcase(loadtype); buskey=upcase(buskey); var_txfrom=upcase(var_txfrom);