Changed master schema as well. collab/Callender/authority_normalize_heading_fix
authorSteven Callender <stevecallender@esilibrary.com>
Fri, 15 Jun 2012 18:35:46 +0000 (14:35 -0400)
committerSteven Callender <stevecallender@esilibrary.com>
Fri, 15 Jun 2012 18:35:46 +0000 (14:35 -0400)
Open-ILS/src/sql/Pg/011.schema.authority.sql

index 1b15025..6f2913a 100644 (file)
@@ -157,7 +157,7 @@ DECLARE
     heading_text    TEXT;
     tmp_text        TEXT;
     first_sf        BOOL;
-    auth_id         INT DEFAULT oils_xpath_string('//*[@tag="901"]/*[local-name()="subfield" and @code="c"]', marcxml)::INT;
+    auth_id         INT DEFAULT COALESCE(NULLIF(oils_xpath_string('//*[@tag="901"]/*[local-name()="subfield" and @code="c"]', marcxml), ''), '0')::INT; 
 BEGIN
     SELECT control_set INTO cset FROM authority.record_entry WHERE id = auth_id;