Project

General

Profile

« Previous | Next » 

Revision 9758

inputs/.TNRS/schema.sql: MatchedTaxon: renamed to ValidMatchedTaxon since this view actually contains only the names with a valid match

View differences:

inputs/.TNRS/schema.sql
91 91
  EXECUTE PROCEDURE tnrs_populate_fields();
92 92

  
93 93

  
94
CREATE OR REPLACE VIEW "MatchedTaxon" AS
94
CREATE OR REPLACE VIEW "ValidMatchedTaxon" AS
95 95
SELECT
96 96
  "Time_submitted" AS "*Name_matched.Time_submitted"
97 97
, "Name_submitted" AS "concatenatedScientificName"
......
145 145

  
146 146
CREATE OR REPLACE VIEW "ScrubbedTaxon" AS
147 147
SELECT *
148
FROM "MatchedTaxon"
148
FROM "ValidMatchedTaxon"
149 149
NATURAL LEFT JOIN "AcceptedTaxon"
150 150
;
schemas/vegbien.sql
4561 4561
--
4562 4562

  
4563 4563
CREATE VIEW tnrs_input_name AS
4564
    WITH "AcceptedTaxon" AS (SELECT DISTINCT "MatchedTaxon"."acceptedScientificName" AS taxonomicname FROM ("TNRS"."MatchedTaxon" LEFT JOIN "TNRS"."AcceptedTaxon" ON (("AcceptedTaxon"."acceptedScientificName" = "MatchedTaxon"."acceptedScientificName"))) WHERE (("MatchedTaxon"."acceptedScientificName" IS NOT NULL) AND ("AcceptedTaxon"."acceptedScientificName" IS NULL))) SELECT "AcceptedTaxon".taxonomicname FROM "AcceptedTaxon" UNION ALL (SELECT DISTINCT taxonlabel.taxonomicname FROM (taxonlabel LEFT JOIN "TNRS"."MatchedTaxon" ON (("MatchedTaxon"."concatenatedScientificName" = taxonlabel.taxonomicname))) WHERE ((taxonlabel.taxonomicname IS NOT NULL) AND ("MatchedTaxon"."concatenatedScientificName" IS NULL)) EXCEPT SELECT "AcceptedTaxon".taxonomicname FROM "AcceptedTaxon");
4564
    WITH "AcceptedTaxon" AS (SELECT DISTINCT "ValidMatchedTaxon"."acceptedScientificName" AS taxonomicname FROM ("TNRS"."ValidMatchedTaxon" LEFT JOIN "TNRS"."AcceptedTaxon" ON (("AcceptedTaxon"."acceptedScientificName" = "ValidMatchedTaxon"."acceptedScientificName"))) WHERE (("ValidMatchedTaxon"."acceptedScientificName" IS NOT NULL) AND ("AcceptedTaxon"."acceptedScientificName" IS NULL))) SELECT "AcceptedTaxon".taxonomicname FROM "AcceptedTaxon" UNION ALL (SELECT DISTINCT taxonlabel.taxonomicname FROM (taxonlabel LEFT JOIN "TNRS"."ValidMatchedTaxon" ON (("ValidMatchedTaxon"."concatenatedScientificName" = taxonlabel.taxonomicname))) WHERE ((taxonlabel.taxonomicname IS NOT NULL) AND ("ValidMatchedTaxon"."concatenatedScientificName" IS NULL)) EXCEPT SELECT "AcceptedTaxon".taxonomicname FROM "AcceptedTaxon");
4565 4565

  
4566 4566

  
4567 4567
--

Also available in: Unified diff