[OPEN-ILS-GENERAL] Batch deleting records

Jason Stephenson jstephenson at mvlcstaff.org
Thu Jun 16 12:35:13 EDT 2016


This is where using a separate bib source for ebook records comes in 
very handy. You can limit the SQL query to just records on that source 
with a little modification.

We create a new source for every new source of ebook records here. That 
way, it is easy to update or to delete them all at once.

I know that may not help you right now, but it is a good idea for the 
future.



On 06/16/2016 12:13 PM, Rogan Hamby wrote:
> I would second what Elaine just said and go a bit further.  I'd say it's
> downright common.
>
> On Thu, Jun 16, 2016 at 12:11 PM, Elaine Hardy
> <ehardy at georgialibraries.org <mailto:ehardy at georgialibraries.org>> wrote:
>
>     ​Use extreme caution with a list from ISBNs. Some bib records for
>     print versions of the title may have ISBNs for the ebook. ​
>
>
>
>     J. Elaine Hardy
>     PINES & Collaborative Projects Manager
>     Georgia Public Library Service/PINES
>     1800 Century Place, Ste. 150
>     Atlanta, GA 30045
>
>     404.235.7128 <tel:404.235.7128> Office
>     404.548.4241 <tel:404.548.4241> Cell
>     404.235.7201 <tel:404.235.7201> FAX
>
>     On Thu, Jun 16, 2016 at 11:47 AM, Blake Henderson
>     <blake at mobiusconsortium.org <mailto:blake at mobiusconsortium.org>> wrote:
>
>         Chris,
>
>         You will need to get a list of record ID's. Record buckets use
>         record ID's.
>
>         The easiest way to do that would be a SQL query.
>
>         Something like this:
>
>         select distinct record, isbn from
>         (
>         select record,regexp_replace(value,$$\D$$,$$$$,$$g$$)
>         \"isbn\",value from metabib.real_full_rec where
>         record in
>         (
>         select record from asset.call_number where
>         not deleted and
>         label=$$##URI##$$
>         )
>         )
>         and
>         tag=$$020$$
>         and
>         record not in(select id from biblio.record_entry where deleted)
>         ) as a
>         where length(isbn) in(10,13)
>         and
>         isbn in
>         ( COMMA SEPARATED ISBN LIST )
>         order by 1;
>
>
>         The above query has a section "COMMA SEPARATED ISBN LIST"  where
>         you will have to fill in your list like this:
>
>         '4412349854 <tel:4412349854>',
>         '2390340943',
>         '2390340943345',
>         ....
>         ....
>
>         This will return record id's that have scoped 856 URLs. If your
>         records do not have scoped 856's, then you will need to remove
>         this section of the query:
>
>         record in
>         (
>         select record from asset.call_number where
>         not deleted and
>         label=$$##URI##$$
>         )
>         )
>         and
>
>
>         Once you have your record ID's, then you may as well delete them
>         in SQL (make sure the list looks correct)
>
>         Delete query:
>
>         delete from biblio.record_entry where id in( LIST OF IDS );
>
>
>
>         -Blake-
>         Conducting Magic
>         MOBIUS
>         573-234-4513 <tel:573-234-4513>
>         877-312-3517 <tel:877-312-3517>
>
>         On 6/16/2016 10:17 AM, Chris Owens wrote:
>>
>>         Is there an "easy" way to get a multiple records (50-75) into
>>         a record bucket from a list of ISBNs? We are going to have to
>>         start deleting eBook records from our system given a list of
>>         titles with ISBNs. And I am trying to avoid doing it record by
>>         record.
>>
>>         I appreciate any advice.
>>
>>         Thanks,
>>
>>         Chris
>>
>>
>>         --
>>
>>         Chris Owens____
>>
>>         Director____
>>
>>         Blanchester Public Library____
>>
>>         110 N. Broadway____
>>
>>         Blanchester, OH 45107____
>>
>>         937-783-3585 <tel:937-783-3585>____
>>
>>         937-783-2910 <tel:937-783-2910> (fax)____
>>
>>         <mailto:cowens at blanlibrary.org>cowens at blanlibrary.org
>>         <mailto:cowens at blanlibrary.org>____
>>
>>         __ __
>>
>>         __ __
>>
>
>
>
>
>
> --
> --------------------------------------------------------------
> Rogan R. Hamby, Data and Project Analyst
> Equinox - Open Your Library
> rogan at esilibrary.com <mailto:rogan at esilibrary.com>
> 1-877-OPEN-ILS | www.esilibrary.com <http://www.esilibrary.com>
>

-- 
Jason Stephenson
Assistant Director for Technology Services
Merrimack Valley Library Consortium
4 High ST, Suite 175
North Andover, MA 01845
Phone: 978-557-5891
Email: jstephenson at mvlcstaff.org

Please note my new email address.


More information about the Open-ils-general mailing list