Project

General

Profile

« Previous | Next » 

Revision 11706

fix: schemas/vegbien.sql: taxon_trait_view: include only TNRS-valid names

View differences:

schemas/vegbien.sql
4435 4435
--
4436 4436

  
4437 4437
CREATE VIEW taxon_trait_view AS
4438
 SELECT COALESCE(taxon_scrub.scrubbed_taxon_name_no_author, taxonverbatim.taxonname, taxonverbatim.taxonomicname, taxonlabel.taxonomicname) AS "scientificName", 
4438
 SELECT taxon_scrub.scrubbed_taxon_name_no_author AS "scientificName", 
4439 4439
    trait.name AS "measurementType", 
4440 4440
    trait.value AS "measurementValue", 
4441 4441
    trait.units AS "measurementUnit"
......
4444 4444
   LEFT JOIN taxondetermination ON (((taxondetermination.taxonoccurrence_id = taxonoccurrence.taxonoccurrence_id) AND taxondetermination.iscurrent)))
4445 4445
   LEFT JOIN taxonverbatim USING (taxonverbatim_id))
4446 4446
   LEFT JOIN taxonlabel USING (taxonlabel_id))
4447
   LEFT JOIN "TNRS".taxon_scrub ON ((taxon_scrub."concatenatedScientificName" = taxonlabel.taxonomicname)));
4447
   LEFT JOIN "TNRS".taxon_scrub ON ((taxon_scrub."concatenatedScientificName" = taxonlabel.taxonomicname)))
4448
  WHERE (taxon_scrub.scrubbed_taxon_name_no_author IS NOT NULL);
4448 4449

  
4449 4450

  
4450 4451
--

Also available in: Unified diff