1 (edited by DaveSlade 31-07-2018 09:21:08)

Topic: Erroneous Duplicated Sample Recorders

This problem seems to have been hidden within my database for many years ad only came to light when trying to improve my update and extraction scripts.

In Recorder, if I go to a Survey Event I can only see one Survey_event_recorder (Recorder A)
If I go to the Sample, there is also only one Sample Recorder, and that is the same person (Recorder A).
But if I use Mike's SQL Server script 'FormatEventRecordersComma' and provide it with that Sample Key I get:
Recorder A, Recorder B
And here is the problem - there is no obvious reason for Recorder B to be associated with this record. He is not the determiner and whilst the two recorders are contemporary, their paths seldom cross in the real world.

Looking in the database, there is a single entry in the SURVEY_EVENT_RECORDER table and that matches the behavior observed in Recorder.
Looking at the SAMPLE_RECORDER table however shows the problem. Somehow there are two entries for the sample, each pointing at a different SE_RECORDER_KEY:

SAMPLE_KEY    SE_RECORDER_KEY    ENTERED_BY    ENTRY_DATE
BRC0000000015PHO    BRC0000000015PAR    LC00021500000001    10/08/2015 17:38:00
BRC0000000015PHO    BRC0000000015PHO    LC000215000004D3    26/09/2016

This second SE_RECORDER_KEY is associated with two Samples, and looking at the other sample in Recorder shows that this sample has no Taxon Occurrence associated with it.

This seems to affect around 100 records, but they are a pain to find. I'm confident that I can simply delete the erroneous SAMPLE_RECORDER entry, but it would be really useful to know how this corruption might have come about! The records in the above example have been downloaded from Indicia using the Indidica2Recorder addin which I have no reason to doubt until now.

If anyone has any thoughts I would be grateful.
Dave

Dave Slade
Senior IT & Records Officer,
15 Talbot Road, Talbot Green, Pontyclun, CF72 8AD
www.sewbrec.org.uk, www.sewbrecord.org.uk