@@ -11058,36 +11058,36 @@ end unassign_loc_groups;
1105811058
1105911059 procedure build_search_doc(
1106011060 p_rowid in rowid,
11061- p_doc out clob
11061+ p_doc out varchar2
1106211062 )
11063- is
11063+ is
1106411064 begin
11065- select
11066- coalesce(b.base_location_id,'') || ' '
11067- || coalesce(pl.sub_location_id,'') || ' '
11068- || case
11069- when pl.sub_location_id is not null
11070- then b.base_location_id || '-' || pl.sub_location_id || ' '
11071- else ''
11072- end
11073- || coalesce(pl.public_name,'') || ' '
11074- || coalesce(pl.long_name,'') || ' '
11075- || coalesce(pl.description,'') || ' '
11076- || coalesce(pl.map_label,'') || ' '
11077- || coalesce(pl.nearest_city,'') || ' '
11078- || coalesce(k.location_kind_id,'') || ' '
11079- || coalesce(pl.location_type,'')
11065+ select max(
11066+ coalesce(b.base_location_id,'') || ' '
11067+ || coalesce(pl.sub_location_id,'') || ' '
11068+ || case
11069+ when pl.sub_location_id is not null
11070+ then b.base_location_id || '-' || pl.sub_location_id || ' '
11071+ else ''
11072+ end
11073+ || coalesce(pl.public_name,'') || ' '
11074+ || coalesce(pl.long_name,'') || ' '
11075+ || coalesce(pl.description,'') || ' '
11076+ || coalesce(pl.map_label,'') || ' '
11077+ || coalesce(pl.nearest_city,'') || ' '
11078+ || coalesce(k.location_kind_id,'') || ' '
11079+ || coalesce(pl.location_type,'')
11080+ )
1108011081 into p_doc
1108111082 from at_physical_location pl
11082- join at_base_location b
11083- on b.base_location_code = pl.base_location_code
11084- join cwms_location_kind k
11085- on k.location_kind_code = pl.location_kind
11083+ left join at_base_location b
11084+ on b.base_location_code = pl.base_location_code
11085+ left join cwms_location_kind k
11086+ on k.location_kind_code = pl.location_kind
1108611087 where pl.rowid = p_rowid;
1108711088
11088- exception
11089- when others then
11090- p_doc := null;
11089+ p_doc := coalesce(p_doc, '');
11090+
1109111091 end build_search_doc;
1109211092
1109311093begin
0 commit comments