Every day i receive a txt file that contains different fields and 1 field that can contain 'OK' or 'KO'.

I need to store the row with fields 'KO' to create an archive of the error.

The following day i will receive the txt file that can contains new error (row with field 'KO') or other row with field 'OK'.

First: i need to check if the error of the first day has been solved --> i can match row of archive with row in the new file on ID and check if the field with KO become OK and write this information in new field: 'solved' 'unsolved'. the error of the first day can be unsolved on the second day (KO).

second: i need to archive the new error of the day (KO) and testing them the following day.

But now i have new problem!! The following day, after reloaded data from archive and match it with new data of the day to check if problems are solved or unsolved... Left join doesnt write new flag (ok or ko) on the last ko of the previous day.... I think i would need a function like update in sql....