0

I am trying to delete records on MDS using the staging table, and although I already updated the records to the ImportType 4 (Delete record):

Leaf Staging Table

On MDS it appears not only the correct line (Code 29355) but also the other ones that should have been deleted:

enter image description here

igdc
  • 43
  • 1
  • 9
  • [Tips for asking a good Structured Query Language (SQL) question](//meta.stackoverflow.com/questions/271055) – Aarlaneth Oct 19 '22 at 12:30
  • [Please do not upload images of code/data/errors when asking a question.](//meta.stackoverflow.com/q/285551) – Aarlaneth Oct 19 '22 at 12:30

1 Answers1

1

Solution found:

Instead of updating only the ImportType value in Leaf Staging Table with 4 the ImportStatus_ID must also be updated to 0.

! Be careful: one of the errors raised was related with deleting members that had already been deleted --> To correct this, it was added to the update statement referred above the condition of only updating to (ImportType = 4, ImportStatus_ID = 0) the records that have the ImportType = 0 (new members).

igdc
  • 43
  • 1
  • 9