sample SQL for EO delimlists for COUNTY, MAPSHEET, WATERSHED, MA_NAME, CITATIONS, and OWNER_TYPE
You should be able to insert the delimlists into the "SELECT" portion of any EO query. The delimlists are self-contained mini queries and the tables in the delimlists do not need to appear anywhere else in the query. Most of these use the _dvw view tables which display the domain values. If you want a different value - say just the watershed code you can edit the "select" section within the delimlist to display a different field.
AUTHOR: Lynn Kutner, NatureServe
DATE: August 24, 2004
UPDATED: October 21, 2024 by Whitney Weber
SELECT eo.eo_id,
DelimList('SELECT b.display_value FROM eo_county a, d_county b WHERE a.d_county_id = b.d_county_id and a.eo_id='||eo.eo_id, '; ') AS counties,
DelimList('SELECT b.mapsheet_name FROM eo_mapsheet a, d_mapsheet b WHERE a.d_mapsheet_id = b.d_mapsheet_id and a.eo_id='||eo.eo_id, '; ') AS quads,
DelimList('SELECT b.watershed_desc FROM eo_watershed a, d_watershed b WHERE a.d_watershed_id = b.d_watershed_id and a.eo_id='||eo.eo_id, '; ') AS watersheds,
DelimList('SELECT ma.managed_area_name FROM ma, eo_managed_area eoma' ||
' WHERE ma.managed_area_id = eoma.managed_area_id AND eoma.eo_id=' || eo.eo_id, '; ') AS ma_name,
DelimList('SELECT ref.reference_code || '': '' || ref.formatted_full_citation FROM reference ref, eo_reference eoref'
|| ' WHERE ref.reference_id = eoref.reference_id AND eoref.eo_id=' || eo.eo_id, ' * ') AS citations,
DelimList('SELECT d_owner_type.owner_type_cd FROM d_owner_type, eo_owner eoown'
|| ' WHERE d_owner_type.d_owner_type_id = eoown. d_owner_type_id AND eoown.eo_id=' || eo.eo_id, '; ') AS eo_own
FROM eo,
element_subnational,
subnation
WHERE eo.element_subnational_id = element_subnational.element_subnational_id
and element_subnational.subnation_id = subnation.subnation_id