>glad you came up with code wich works for you. I am interested to see if there is a better solution.
Well, to my big surprise this morning, we got some duplicates over night. I can't understand how that happened as it requires a lock to proceed with this code. I'll have to recheck all that again. This is just some log data but I would really like to clean it up.