From: miker Date: Thu, 22 Jul 2010 01:05:58 +0000 (+0000) Subject: backport of r17007: retain the indicators on located uri 856 merge during asset merge X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c05d44acda341fe13aa159768eb5a0e9bc87648a;p=working%2FEvergreen.git backport of r17007: retain the indicators on located uri 856 merge during asset merge git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6_1@17010 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/sql/Pg/999.functions.global.sql b/Open-ILS/src/sql/Pg/999.functions.global.sql index 1fe4bedf21..c6d8792884 100644 --- a/Open-ILS/src/sql/Pg/999.functions.global.sql +++ b/Open-ILS/src/sql/Pg/999.functions.global.sql @@ -242,7 +242,10 @@ BEGIN ) as t(i int,c text); FOR i IN 1 .. counter LOOP - SELECT '' || + SELECT '' || array_to_string( array_accum( '' || @@ -259,10 +262,12 @@ BEGIN 'id', 'marc', 'biblio.record_entry', + '//*[@tag="856"][position()=' || i || ']/@ind1|' || + '//*[@tag="856"][position()=' || i || ']/@ind2|' || '//*[@tag="856"][position()=' || i || ']/*/@code|' || '//*[@tag="856"][position()=' || i || ']/*[@code]', 'id=' || source_record - ) as t(id int,subfield text,data text); + ) as t(id int,ind1 text, ind2 text,subfield text,data text); uri_text := uri_text || uri_datafield; END LOOP;