BerryHoning

Get rid of 2nd, 3rd, even 4th. duplicates of a record

Discussion created by BerryHoning on Jun 6, 2017
Latest reply on Jun 11, 2017 by gofmp15

Dear all,

 

Something went wrong in a script (still wondering what!) that is exporting recipe variables separately into a database, used for following our stock of raw materials.

 

This caused amongst others in duplicate values like this:

production date - productnumber - raw material number - quantity raw material - quantity product

01-01-2017          1274                     00020                          20                                 1000

01-01-2017          1274                     00020                          20                                 1000

01-01-2017          1274                     00020                          20                                 1000

 

Which of course is two times too many. I need to get rid of the last two records in this table.

 

I already created a new variable, which combines all these values, so I can identify the doubles by finding with the help of the "!" operator.

I can do them all at once but I am afraid then I'm stuck till the end of the year.


How can I make a script that takes these 2nd, 3rd, 4th. etc. duplicates out??

 

Berry

Outcomes