Comment 1 for bug 1869896

Revision history for this message
Jason Stephenson (jstephenson) wrote :

Here's a query that will identify patron barcodes that are duplicates, except for case.

select a.usr, a.id, a.barcode, b.usr, b.id, b.barcode
from actor.card a
join actor.card b
on lower(a.barcode) = lower(b.barcode)

We have over a hundred of these. Several belong to the same user.

And, here's one for copy barcodes:

select a.id, a.barcode, b.id, b.barcode
from asset.copy a
join asset.copy b
on lower(a.barcode) = lower(b.barcode)
and b.id > a.id
and not a.deleted and not b.deleted;

We have even more of these, over 600 rows returned.

and a.id < b.id;