There are separate queries attached to this solution - one for Biotics5 (Oracle SQL) and one for Biotics6 (PostgreSQL).
Queries to help find and fix possible errors related to SRANK Review Date.
Queries are modified from queries provided by Randi Mulder of the Yukon Conservation Data Centre.
WHY PERFORM THE QUERIES: To catch instances where the SRANK Review Date field has not been updated when the SRANK has changed and the SRANK Change Date has been updated. Presumably, in order to make that change, the SRANK was reviewed, and the review date should have been updated as well. The methodology indicates that the review date should never be older than the change date. Queries in the attached text files offer a way to find and fix these issues.
WHAT THE QUERIES DO:
Query 1: Finds Subnational Elements where the srank review date is null but there is a value in the srank change date.
Query 2: Finds Subnational Elements where the srank review date is older than the srank change date.
ACTION:
Query 3: Update query (B6 query can be run in pgAdmin; B5 query can be run in TOAD, TOra, SQL Developer, or SQL Plus while logged in as the biotics_dlink user) to update the srank review date to whatever the srank change date is (only for those Elements determined above).