[Koha] BULK EDIT BARCODES

muiru james muirunyeri at gmail.com
Thu Jul 30 07:45:41 NZST 2020


Hi Team,

I need to edit barcodes to replace a double hyphen (--) with a single
hyphen (-). The barcodes are many and will take long using the item editor
which allows me to edit one after the other.

Is there a SQL command I could use to edit from the terminal? I tried
running the query below. It is matching the records but changing none. Is
there something I am missing?

MariaDB[koha_library]>
UPDATE items SET barcode = REPLACE(barcode, '%--%', '%-%') WHERE itemnumber
IN (377,378,391,.....);

I am using koha version 19.11 on Ubuntu 16.04 and mysql Ver 15.1 Distrib
10.0.38-MariaDB

Please assist

Warm Regards
James


More information about the Koha mailing list