Project

General

Profile

1
SELECT util.search_path_append('util');
2

    
3
SELECT create_if_not_exists($$CREATE INDEX "Specimen.acronym" ON $$||:table_str||$$ ("dwc_terms_institutionCode")$$);
4

    
5
-- Remove institutions that we have direct data for
6
DELETE FROM :table
7
WHERE "dwc_terms_institutionCode" IN (
8
      'MO'
9
    , 'NY'
10
)
11
/* list obtained using:
12
SELECT DISTINCT dataprovider
13
FROM sourcelist
14
JOIN provider_count ON provider_count.dataprovider = sourcelist.name
15
WHERE source_id = source_by_shortname('SpeciesLink')
16
ORDER BY dataprovider
17
*/
18
;
(6-6/9)