[Koha] Duplicate ISBN report modification

Cab Vinton bibliwho at gmail.com
Wed Aug 15 03:27:54 NZST 2018


Hi, All --

We're using the following report to identify records w/ duplicate ISBNs.

SELECT GROUP_CONCAT(b.biblionumber SEPARATOR ', ') AS biblionumbers,
b.title, b.author, GROUP_CONCAT(i.isbn SEPARATOR ', ') AS isbns
FROM biblio b
LEFT JOIN biblioitems i ON (i.biblionumber=b.biblionumber)
GROUP BY CONCAT(substr(b.title,0,9),"/",i.isbn)
HAVING COUNT(CONCAT(substr(b.title,0,9),"/",i.isbn))>1

We're a coop, however, so it would be helpful to limit the results to
cases where our particular library owns at least one of the associated
items.

Adding the following lines did not provide correct results, unfortunately:

LEFT JOIN items m ON (m.biblionumber=b.biblionumber)
WHERE m.homebranch = <<Library|branches>>

I suspect a subquery may be required, but it's beyond my current
proficiency w/ MySQL :-(

Thanks in advance for any guidance.

All best,

Cab Vinton, Director
Plaistow Public Library
Plaistow, NH


More information about the Koha mailing list