[OPEN-ILS-GENERAL] Batch deleting records

Rogan Hamby rhamby at esilibrary.com
Thu Jun 16 12:13:30 EDT 2016


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>
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 Office
> 404.548.4241 Cell
> 404.235.7201 FAX
>
> On Thu, Jun 16, 2016 at 11:47 AM, Blake Henderson <
> 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',
>> '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
>> MOBIUS573-234-4513877-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
>>
>> 937-783-2910 (fax)
>>
>> <cowens at blanlibrary.org>cowens at blanlibrary.org
>>
>>
>>
>>
>>
>>
>>
>


-- 
--------------------------------------------------------------
Rogan R. Hamby, Data and Project Analyst
Equinox - Open Your Library
rogan at esilibrary.com
1-877-OPEN-ILS | www.esilibrary.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-general/attachments/20160616/602dfbf0/attachment.html>


More information about the Open-ils-general mailing list