[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-devel] Duplicate items in MARC tables

From: Baiju M
Subject: [Koha-devel] Duplicate items in MARC tables
Date: Sun Apr 11 22:26:19 2004

    When I imported some MARC records to Koha using bulkmarcimport.pl
(I am using Koha 2.0.0) I get duplicate items in MARC tables (items just
doubles in 'marc_subfield_table', but not in 'items' table)

A portion from database dump :

INSERT INTO marc_subfield_table VALUES
(70073,3525,'100',1,'1','a',1,'David W Lindsay',NULL),
(70074,3525,'245',2,'12','a',1,'English poetry 1700-1780',NULL),

See 952 'p' & 'u' repeats and 'u' not only repeats it gets one more value.

Now, I just started looking to source codes. When I looked into 
I found the last for loop creates this problem :
                for (my $i=0;$i<=$#items;$i++) {
When I just commented this for loop, the problem in 'marc_subfield_table' got 
But then, there was no items in 'items' table.

If this is really a bug, will try to fix it myself. Could anyone give any 

Now I am trying to explore it more, here is some other clues I got.

NEWnewbiblio function creates bibio and items in MARC tables (and only bibio in 
NON-MARC tables)
         my ($bibid,$oldbibnum,$oldbibitemnum) = NEWnewbiblio($dbh,$newRecord);

NEWnewitem function creates items in both MARC and NON-MARC tables, in addition 
to that
it also creates one more 952 'u' for each item(?).

NEWnewbiblio function is calling from acqui.simple/addbiblio.pl (Here it will 
not create
any items, just because there is no items)

($bibid,$oldbibnum,$oldbibitemnum) = NEWnewbiblio($dbh,$record);

So, I think NEWnewbiblio cannot use in bulkmarcimport.pl as in the case of 
Atleast it should have a parameter not to add 952 fields(?)

NEWnewitem function is calling from acqui.simple/additem.pl
my ($oldbiblionumber,$oldbibnum,$oldbibitemnum) = 

and this function should use to add items everywhere(including bulkmarcimport).

See, I am just started looking to Koha source code, so my observation maynot be 

With thanks and regards,
Baiju M

Find what you are looking for with the Lycos Yellow Pages

From address@hidden Tue Apr 13 01:47:17 2004
Received: from sc8-sf-mx2-b.sourceforge.net ([] 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]