<div dir="ltr"><div><div>Paul,<br>I can confirm something along the lines of what you are seeing.  I've never been sure if this was cataloger error or Koha error though. What I've seen is that there is a row (i.e. biblionumber) in the biblio table but no corresponding biblionumber row in the biblioitems table.  exists in biblio but not in biblioitems.  Sounds like you are saying that you have a value in biblioitems for a biblionumber but not in the biblio table.  <br>
<br></div>My first instinct is that this would be a delete gone bad.  or a merge gone awry.  Perhaps starting there?  I'm curious though if the biblionumber that you are not finding exists in the deleted biblio table???<br>
<br></div>-joy<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 30, 2014 at 7:22 PM, 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"><div class="">At 10:51 AM 5/1/2014 +1200, Robin Sheat wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Paul A schreef op wo 30-04-2014 om 10:03 [-0400]:<br>
> Can anyone please suggest where I could start looking in the code for<br>
> what<br>
> might cause orphaned biblioitems?<br>
<br>
You're going to have to define what an orphaned biblioitem record is,<br>
because that SQL query doesn't seem to do anything that I'd relate to<br>
that term. Do you mean duplicate biblios?<br>
</blockquote>
<br></div>
Sort of... sorry to be vague, so here's an example, the tail of the query (simplified to remove the html:<br>
<br>
mysql> SELECT GROUP_CONCAT(biblionumber SEPARATOR ', ') AS BibNums,<br>
    -> EXTRACTVALUE(marcxml,'//<u></u>controlfield[@tag="001"]') AS Id FROM biblioitems<br>
    -> GROUP BY Id HAVING count(Id) > 1;<br>
+---------------------+-------<u></u>-------+<br>
| BibNums             | Id           |<br>
+---------------------+-------<u></u>-------+<br>
[snip]<br>
| 22969, 19151        | 8914106      |<br>
+---------------------+-------<u></u>-------+<br>
31 rows in set (0.89 sec)<br>
<br>
gives me 2 biblio numbers (22969, 19151), both for John Toland's book "The flying tigers" which has the Library of Congress 001. A search in the staff page and the OPAC confirm that we only have one -- both show "The Flying Tigers / (Record no. 22969)"<br>

<br>
If I search for the other number as cgi-bin/koha/catalogue/<a href="http://search.pl?q=biblionumber=19151" target="_blank">search.<u></u>pl?q=biblionumber=19151</a> in the staff page I get "No results found No results match your search for 'biblionumber=19151' in NMA Catalog."<br>

<br>
BUT... if I specifically go to /cgi-bin/koha/cataloguing/<a href="http://addbiblio.pl?biblionumber=19151" target="_blank">addb<u></u>iblio.pl?biblionumber=19151</a>, I get a biblio that our cataloguers either overwrote or deleted or whatever... And, because it's not "findable" in the staff page, it cannot be deleted without direct intervention in the MySQL db.<br>

<br>
I called it an "orphaned biblioitem" because, without looking for that LoC 001 in biblioitems, I would have had no clue that an unused record was "floating around."<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
All it's doing is finding the first biblionumber of a set where members<br>
have the same 001. This could just be cataloguing the same thing twice,<br>
or records with badly generated 001 entries, or something along those<br>
lines.<br>
</blockquote>
<br></div>
I'm convinced that your thought "cataloguing the same thing twice" is correct -- quite often our cataloguers use Z39.50 to update/overwrite a biblio, but they swear blind that they always delete any previous record that still appears after re-indexing.<br>

<br>
That's why I'm intrigued about these "orphans"<br>
<br>
Thanks for your interest and best regards -- Paul <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"><br>-- <br><div dir="ltr"><font color="#888888"><div>Joy Nelson<br></div><div>Director of Migrations<br><br></div><div><a href="http://bywatersolutions.com" target="_blank"><span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">ByWater Solutions</span></a><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="border-collapse:separate;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium;font-family:Helvetica"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="border-collapse:separate;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="border-collapse:separate;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="border-collapse:separate;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="border-collapse:separate;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="border-collapse:separate;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="border-collapse:separate;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="border-collapse:separate;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="border-collapse:separate;font-size:medium;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;font-size:medium;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font color="#1e39f6" face="Calibri" size="3"><span style="font-size:12pt;font-family:Calibri"></span></font></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br>
<span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Support and Consulting for Open Source Software<br></span><span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="text-align:-webkit-auto;text-indent:0px"><span style="text-align:-webkit-auto;text-indent:0px"><span style="text-align:-webkit-auto;text-indent:0px"><span style="text-align:-webkit-auto;text-indent:0px"><span style="text-align:-webkit-auto;text-indent:0px"><span style="text-align:-webkit-auto;text-indent:0px"><span style="text-align:-webkit-auto;text-indent:0px"><span style="text-align:-webkit-auto;text-indent:0px"><span style="text-align:-webkit-auto;text-indent:0px"><span style="text-align:-webkit-auto;text-indent:0px"><span style="text-align:-webkit-auto;text-indent:0px"><span style="text-align:-webkit-auto;text-indent:0px"><span style="text-align:-webkit-auto;text-indent:0px"><span style="text-align:-webkit-auto;text-indent:0px"><span style="text-align:-webkit-auto;text-indent:0px"><span style="text-align:-webkit-auto;text-indent:0px"><span style="text-indent:0px"><span style="text-indent:0px"><span style="text-indent:0px"><span style="text-indent:0px"><span style="text-indent:0px"><span style="text-indent:0px"><span style="text-indent:0px"><span style="text-indent:0px"><span style="text-indent:0px"><font><font color="#1e39f6"><span style="font-size:16px"><b></b></span></font></font></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>Office: Fort Worth, TX<br>
Phone/Fax <a value="+18889008944" style="color:rgb(0,0,204)">(888)900-8944</a></span><br><span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><a href="http://bywatersolutions.com/what-is-koha/" target="_blank">What is Koha? </a><br>
<br></span></div></font></div>
</div>