<div dir="ltr">Hi Paul,<div><br></div><div>From how I read this report it returns records with matching Ids (i.e. Control numbers)  I don't think Koha enforces unique control numbers.</div><div><br></div><div>-Nick</div>
<div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 30, 2014 at 10:03 AM, Paul A <span dir="ltr"><<a href="mailto:paul.a@navalmarinearchive.com" target="_blank">paul.a@navalmarinearchive.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Can anyone please suggest where I could start looking in the code for what might cause orphaned biblioitems?<br>
<br>
Running the following query:<br>
<br>
SELECT GROUP_CONCAT('<a target="_blank" href=\"/<br>
cgi-bin/koha/cataloguing/<a href="http://addbiblio.pl?biblionumber=" target="_blank">addbi<u></u>blio.pl?biblionumber=</a>',<u></u>biblionumber,'\">',<u></u>biblionumber,'</a>' SEPARATOR ', ') AS BibNums,<br>

EXTRACTVALUE(marcxml,'//<u></u>controlfield[@tag="001"]') AS Id FROM biblioitems<br>
GROUP BY Id HAVING count(Id) > 1;<br>
<br>
finds ~0.1% of our total catalogue with orphans -- often, but not quite always, they are consecutive biblionumbers leading me to think that this happens during cataloguing (but there seems to be no rhyme nor reason as to how it happens, we cannot purposefully duplicate the error.)<br>

<br>
It's fairly trivial to correct with a " DELETE * FROM biblioitems WHERE biblionumber=123456; " but I'd like to stop it from happening in the first place.<br>
<br>
Thanks for any suggestions,<br>
Paul<br>
<br>
______________________________<u></u>_________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-<u></u>community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.<u></u>org/cgi-bin/mailman/listinfo/<u></u>koha-devel</a><br>
website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.<u></u>org/</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="font-family:arial,helvetica,clean,sans-serif;font-size:13px;line-height:15px;background-color:rgb(255,255,255)">Nick Clemens</span><br style="font-family:arial,helvetica,clean,sans-serif;font-size:13px;line-height:15px;background-color:rgb(255,255,255)">
<span style="font-family:arial,helvetica,clean,sans-serif;font-size:13px;line-height:15px;background-color:rgb(255,255,255)">Quechee & Wilder Libraries</span><br style="font-family:arial,helvetica,clean,sans-serif;font-size:13px;line-height:15px;background-color:rgb(255,255,255)">
<span style="font-family:arial,helvetica,clean,sans-serif;font-size:13px;line-height:15px;background-color:rgb(255,255,255)"><a href="mailto:Nick@quecheelibrary.org" target="_blank">Nick@quecheelibrary.org</a></span><br style="font-family:arial,helvetica,clean,sans-serif;font-size:13px;line-height:15px;background-color:rgb(255,255,255)">
<span style="font-family:arial,helvetica,clean,sans-serif;font-size:13px;line-height:15px;background-color:rgb(255,255,255)"><a href="http://www.QuecheeLibrary.org" target="_blank">http://www.QuecheeLibrary.org</a></span><br style="font-family:arial,helvetica,clean,sans-serif;font-size:13px;line-height:15px;background-color:rgb(255,255,255)">
<span style="font-family:arial,helvetica,clean,sans-serif;font-size:13px;line-height:15px;background-color:rgb(255,255,255)">Q (802) 295-1232 W (802) 295-6341</span>
</div></div>