[Koha-devel] Mass updating a field

Mike Hafen mdhafen at tech.washk12.org
Fri Mar 6 22:07:15 CET 2009


This will have to be done in two parts as you got it setup.  First is to
update the items table, then there is a command line script to update the
marc and zebra.

First:

update db1.items cross join tempdb.items using ( itemnumber ) set
db1.items.barcode = tempdb.items.barcode;

That should take care of the database update.  I haven't tested it though,
so wait on others on list to verify it.

Second:

/usr/local/koha/bin/maintenance/sync_items_in_marc_bib.pl

That should update the marc records in the database and the zebra records.

Good luck.

On Fri, Mar 6, 2009 at 11:25 AM, Roche III, Edward <
edward_roche at solanco.k12.pa.us> wrote:

>  Good Afternoon All
>
>
>
> I posted on the Koha users list as well but figured I would try here as to.
>
>
>
> I am in need of a SQL statement to update my barcode field in the items
> table. When we exported our catalog from Follett it removed a space that was
> in out barcodes so now when we try to scan an item it is not being found
> because the barcode field in Koha is missing the space. What I have done so
> far:
>
>
>
> 1)      Export from the items table: itemnumber and barcode
>
> 2)      Added the space back into the barcode field
>
> 3)      Created a temp table in the koha db
>
> 4)      Imported the data into the temp table
>
>
>
> I now need to move the data from the temp table over to the items table to
> update the barcode field.
>
>
>
> Any thoughts?
>
>
>
> Thanks
>
> Ed
>
>
>
> Edward J. Roche
>
> Network Administrator
>
> Solanco School District
>
> 717.786.2151 x2437
>
>
>
>
>
> "At the End of the Day, Did You Play to Win or Not to Lose?"
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha.org
> http://lists.koha.org/mailman/listinfo/koha-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-devel/attachments/20090306/a6bede0f/attachment-0003.htm>


More information about the Koha-devel mailing list