Revision 7152
Added by Aaron Marcuse-Kubitza almost 12 years ago
schemas/vegbien.sql | ||
---|---|---|
4484 | 4484 |
-- |
4485 | 4485 |
|
4486 | 4486 |
CREATE VIEW tnrs_input_name AS |
4487 |
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 |
WITH accepted_name AS (SELECT DISTINCT tnrs."Accepted_scientific_name" AS taxonomicname FROM ("TNRS".tnrs LEFT JOIN "TNRS".tnrs tnrs_accepted ON ((tnrs_accepted."Name_submitted" = tnrs."Accepted_scientific_name"))) WHERE ((tnrs."Accepted_scientific_name" IS NOT NULL) AND (tnrs_accepted."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);
|
|
4488 | 4488 |
|
4489 | 4489 |
|
4490 | 4490 |
-- |
Also available in: Unified diff
schemas/vegbien.sql: tnrs_input_name: Use TNRS.tnrs directly instead of the now-deprecated tnrs+accepted