[Koha] same barcode number

Martin Longo jmlongo at uncu.edu.ar
Thu Dec 23 05:20:09 NZDT 2004


I have a similar problem, but regarding different items with the same 
barcode number but from different branches

Say I have branches A and B

there's an item with barcode 1234 at branch A
and a completely different item at branch B with barcode 1234

both items were "bulmarkimported" into Koha

If I search the catalogue for barcode '1234' I find both items, with 
their correspondig 'holdingbranch'

*BUT*

when I try to issue item 1234 ... Koha always issues item 1234 from 
branch A...  and I never get to choose item 1234 from branch B..

changing my configuration to Branch B is useless..

Any ideas?

Jared Jennings escribió:
> On Thu, 16 Dec 2004 17:27:20 -0800 (PST), Yohannes Mulugeta
> <yohannesmulu at yahoo.com> wrote:
> 
>>we are trying to add items to the
>>biblio but it accepts
>>the same barcode number for different items. Can any
>>body help us?
> 
> 
> you can run the following sql statement to enforce uniqueness of barcodes.
> 
> alter table items change barcode barcode varchar(20) not null unique;
> 
> you must of course do this from the mysql client - example
> 
> $ mysql -u root -p Koha
> Password: .......
> mysql> alter table items change barcode barcode varchar(20) not null unique;
> ERROR 1062: Duplicate entry '' for key 2
> mysql>
> 
> if you have any duplicates or empty barcodes when you try to run the
> sql command, it will stop with an error like this. you must fix all
> the duplicates before it will work.
> 
> unfortunately NULL == NULL, so if you want to require that all
> barcodes be unique, you must also require that they be supplied (not
> null). that's what the error in the example above means: the first
> record has a null barcode, and so does the second. that's not unique!
> so "fixing all the duplicates" as i said above also means making sure
> every item has a barcode.
> 
> the requirement to enter barcodes (and to have unique ones) was
> removed in Sept. 2003, for those who don't wish to use them in their
> libraries i presume (anyone else, jump in here...). you can see the
> changes to the code of the updater script at
> http://cvs.sourceforge.net/viewcvs.py/koha/koha/updater/updatedatabase?r1=1.58&r2=1.59
> _______________________________________________
> Koha mailing list
> Koha at lists.katipo.co.nz
> http://lists.katipo.co.nz/mailman/listinfo/koha
> 

-- 
J. Martin Longo
Informatica
SID - UNCuyo
http://sid.uncu.edu.ar



More information about the Koha mailing list