Project

General

Profile

« Previous | Next » 

Revision 7137

schemas/vegbien.sql: tnrs_input_name: Fixed bug where need to filter out tnrs+accepted rows with NULL Accepted_scientific_name, because inputs to tnrs_db must be strings

View differences:

schemas/vegbien.sql
4483 4483
--
4484 4484

  
4485 4485
CREATE VIEW tnrs_input_name AS
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);
4486
    WITH accepted_name AS (SELECT DISTINCT "tnrs+accepted"."Accepted_scientific_name" AS taxonomicname FROM "TNRS"."tnrs+accepted" WHERE (("tnrs+accepted"."Accepted_scientific_name" IS NOT NULL) AND ("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 (((taxonlabel.taxonomicname IS NOT 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