Project

General

Profile

« Previous | Next » 

Revision 7136

schemas/vegbien.sql: tnrs_input_name: Prepend TNRS accepted names that have not yet been parsed. This allows parsing TNRS accepted names without first needing to import them into taxonlabels, which may not occur until the next import.

View differences:

schemas/vegbien.sql
4483 4483
--
4484 4484

  
4485 4485
CREATE VIEW tnrs_input_name AS
4486
    SELECT DISTINCT taxonlabel.taxonomicname FROM (taxonlabel LEFT JOIN "TNRS".tnrs ON ((tnrs."Name_submitted" = taxonlabel.taxonomicname))) WHERE (((NOT (taxonlabel.taxonomicname IS NULL)) AND (taxonlabel.matched_label_id IS NULL)) AND (tnrs."Name_submitted" IS NULL)) ORDER BY taxonlabel.taxonomicname;
4486
    WITH accepted_name AS (SELECT DISTINCT "tnrs+accepted"."Accepted_scientific_name" AS taxonomicname FROM "TNRS"."tnrs+accepted" WHERE ("tnrs+accepted"."Accepted_name.Name_submitted" IS NULL)) SELECT accepted_name.taxonomicname FROM accepted_name UNION ALL (SELECT DISTINCT taxonlabel.taxonomicname FROM (taxonlabel LEFT JOIN "TNRS".tnrs ON ((tnrs."Name_submitted" = taxonlabel.taxonomicname))) WHERE (((NOT (taxonlabel.taxonomicname IS NULL)) AND (taxonlabel.matched_label_id IS NULL)) AND (tnrs."Name_submitted" IS NULL)) EXCEPT SELECT accepted_name.taxonomicname FROM accepted_name);
4487 4487

  
4488 4488

  
4489 4489
--

Also available in: Unified diff