Project

General

Profile

« Previous | Next » 

Revision 11498

schemas/vegbien.sql: taxondetermination_set_iscurrent(): removed no longer used accepted, matched determinationtypes (for these determinations, left-join to TNRS.ScrubbedTaxon)

View differences:

schemas/vegbien.sql
1367 1367
        SELECT taxondetermination_id FROM taxondetermination
1368 1368
        WHERE taxonoccurrence_id = taxonoccurrence_id_
1369 1369
        ORDER BY
1370
            -- Scrubbed determinations must come first for scrub.make to work
1371
              COALESCE(determinationtype = 'accepted', false) DESC/*true first*/
1372
            , COALESCE(determinationtype = 'matched', false) DESC/*true first*/
1373
            , isoriginal/*false first*/
1370
              isoriginal/*false first*/
1374 1371
            , determinationdate DESC NULLS LAST
1375 1372
        LIMIT 1
1376 1373
    );
......
1382 1379
    WHERE taxondetermination_id = (
1383 1380
        SELECT taxondetermination_id FROM taxondetermination
1384 1381
        WHERE taxonoccurrence_id = taxonoccurrence_id_
1385
        AND   (determinationtype IS NULL
1386
            OR determinationtype NOT IN ('accepted', 'matched'))
1387 1382
        ORDER BY
1388 1383
            isoriginal/*false first*/
1389 1384
            , determinationdate DESC NULLS LAST

Also available in: Unified diff