[open-ils-commits] r17007 - trunk/Open-ILS/src/sql/Pg (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jul 21 20:58:50 EDT 2010
Author: miker
Date: 2010-07-21 20:58:49 -0400 (Wed, 21 Jul 2010)
New Revision: 17007
Modified:
trunk/Open-ILS/src/sql/Pg/999.functions.global.sql
Log:
retain the indicators on located uri 856 merge during asset merge; update script and backporting to come
Modified: trunk/Open-ILS/src/sql/Pg/999.functions.global.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/999.functions.global.sql 2010-07-21 21:35:50 UTC (rev 17006)
+++ trunk/Open-ILS/src/sql/Pg/999.functions.global.sql 2010-07-22 00:58:49 UTC (rev 17007)
@@ -997,7 +997,10 @@
) as t(i int,c text);
FOR i IN 1 .. counter LOOP
- SELECT '<datafield xmlns="http://www.loc.gov/MARC21/slim" tag="856">' ||
+ SELECT '<datafield xmlns="http://www.loc.gov/MARC21/slim"' ||
+ ' tag="856"' ||
+ ' ind1="' || FIRST(ind1) || '"' ||
+ ' ind2="' || FIRST(ind2) || '">' ||
array_to_string(
array_accum(
'<subfield code="' || subfield || '">' ||
@@ -1014,10 +1017,12 @@
'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;
More information about the open-ils-commits
mailing list