1

Topic: Deletion of unwanted sites/subsites

Some time ago I imported a dataset (to my R6 via the R3 Import Add-In) from a colleague's R3 and placed this data in a single survey. A year later I wanted to import a modified dataset of his to my R6 also via the R3 Import Add-In. Before carrying out this second import I deleted the old survey containing the old data. This deleted the taxon occurrences but not the locations of course. Having then imported the later dataset also via the R3 Import Add-In, I find that, as expected, sites/subsites are now duplicated; in any pair of identical locations one has data (new Survey) and one does not (resulting from deletion of old Survey). Is there a batch update available that will delete sites/subsites which have no taxon occurrences, samples, names and documents associated with them?

Bob Marsh
Doncaster LRC
Coleoptera recorder for YNU

2

Re: Deletion of unwanted sites/subsites

Did anyone have any thoughts on the above post.....??

Bob Marsh
Doncaster LRC
Coleoptera recorder for YNU

3

Re: Deletion of unwanted sites/subsites

It should be easy enough to select all such sites with a query, probably relying on the LOCATION.ENTRY_DATE & LOCATION.ENTERED_BY fields would be sufficient to return all of their LOCATION_KEYs. On our system I would not risk just selecting locations with nothing associated, because we do have many sites which so far have nothing much attached, but may still contain something useful in the description field or elsewhere.

Then you would need to identify all the tables which might contain stuff associated with these sites. That might just be LOCATION and LOCATION_NAME, but you would need to check what information about each site was actually imported.

Then a simple delete query using the list of keys you first created to select first from dependent tables (LOCATION_NAME etc.) and then from LOCATION ITSELF.

The whole process looks pretty straightforward to me at first glance, but then I don't have to actually do it.

Good luck

Rob Large
Wildlife Sites Officer
Wiltshire & Swindon Biological Records Centre

4

Re: Deletion of unwanted sites/subsites

Thanks for that advice Rob.....

Bob Marsh
Doncaster LRC
Coleoptera recorder for YNU