From 37499f1b66239a24f0396a7a85dd3d77e9cb671c Mon Sep 17 00:00:00 2001 From: David M Sibley Date: Fri, 24 Apr 2015 14:40:26 -0500 Subject: [PATCH] setting up searchable station as both short name and nwis site no --- .../cida/gcmrcservices/mb/mappers/ReachDetailMapper.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcmrc-services/src/main/resources/gov/usgs/cida/gcmrcservices/mb/mappers/ReachDetailMapper.xml b/gcmrc-services/src/main/resources/gov/usgs/cida/gcmrcservices/mb/mappers/ReachDetailMapper.xml index 18bb5f2..e10dbbc 100644 --- a/gcmrc-services/src/main/resources/gov/usgs/cida/gcmrcservices/mb/mappers/ReachDetailMapper.xml +++ b/gcmrc-services/src/main/resources/gov/usgs/cida/gcmrcservices/mb/mappers/ReachDetailMapper.xml @@ -28,7 +28,11 @@ FROM (SELECT DISTINCT - (SELECT NWIS_SITE_NO FROM SITE_STAR WHERE SITE_STAR.SITE_ID = SITE_ID_UP) UPSTREAM_STATION, + (SELECT (CASE + WHEN NWIS_SITE_NO IS NOT NULL + THEN NWIS_SITE_NO + ELSE SHORT_NAME + END) FROM SITE_STAR WHERE SITE_STAR.SITE_ID = SITE_ID_UP) UPSTREAM_STATION, (SELECT NAME FROM GROUP_NAME WHERE GROUP_NAME.GROUP_ID = RTD.REACH_GROUP) REACH_GROUP, (SELECT NAME FROM GROUP_NAME WHERE GROUP_NAME.GROUP_ID = RTD.MAJOR_GROUP) MAJOR_GROUP, (SELECT (