Topic: Batch Update on Individual
Hi All, I was wondering if anyone has a working batch update for R6 that will delete from the database any records from a particular Individual recorder.
The technical forum of the NBN Trust for use by the Network. It includes discussions and announcements on the NBN Atlas, Recorder 6 and Indicia |
You are not logged in. Please login or register.
Forum → How Do I... & Other Questions → Batch Update on Individual
Hi All, I was wondering if anyone has a working batch update for R6 that will delete from the database any records from a particular Individual recorder.
Should be easy enough to achieve with existing batch updates & a bit of SQL, assuming that you want to delete all records where that individual is a recorder (i.e. including any records where there are other additional recorders.
First (make a backup!) modify (inserting the individual's name key) the following SQL and run it either in the linked Access database or in management studio
UPDATE
((TAXON_OCCURRENCE INNER JOIN SAMPLE ON TAXON_OCCURRENCE.SAMPLE_KEY = SAMPLE.SAMPLE_KEY)
INNER JOIN SURVEY_EVENT ON SAMPLE.SURVEY_EVENT_KEY = SURVEY_EVENT.SURVEY_EVENT_KEY)
INNER JOIN SURVEY_EVENT_RECORDER ON SURVEY_EVENT.SURVEY_EVENT_KEY = SURVEY_EVENT_RECORDER.SURVEY_EVENT_KEY
SET TAXON_OCCURRENCE.COMMENT = "DELETETHISRECORD"
WHERE (((SURVEY_EVENT_RECORDER.NAME_KEY)="Individual's NAME_KEY"))
Then use the batch update Del2 to delete all records with DELETETHISRECORD in the comment field
Then if required also run Del4 & Del3 to remove any empty samples and events
That's how I would tackle it anyway, I can think of a few other ways too though.
Excellent, cheers Rob
Forum → How Do I... & Other Questions → Batch Update on Individual
Powered by PunBB 1.4.6, supported by Informer Technologies, Inc.