On 9/11/12 7:18 PM, Mary Llewellyn wrote:
I see 2 ways to go: find and export all the bibs involved, delete the
obsolete 856s in a third-party MARC editor, then load the bibs back in
and replace the bibs in the database. Or, develop some backdoor way to
remove the 856s using SQL, just for the one library. It helps that
each library has a unique URL, such as
http://smalltownct.oneclickdigital.com. Only trouble is I'm not sure
how to write a query incorporating a MARC tag and a particular string.
You'll find an example of using regexp_replace here:
http://www.evergreen-ils.org/dokuwiki/doku.php?id=scratchpad:random_magic_spells#how_to_prune_a_tag_under_the_hood
Your trick will be to craft the regular expression to match the 856, and
presumably sub 9's, you're looking to clean up.
As noted with that link above, use with caution. You'd be well served
to test the query ahead of time, either by using a copy of the data, or
select some records into a temporary table to test and fine tune your query.
Finally, consider the scope of the query. Mass editing
biblio.record_entry will create a lot of DB work while all the edits
fire the laundry list of triggered functions, so you may need to batch
the updates.