[Koha] Unexpected report results - returning old data

Elaine Bradtke eb at efdss.org
Tue Apr 23 06:28:19 NZST 2013


I'm running Koha  3.10.02
We have a report that looks for 6XX fields that are not linked to
authorities and spits out a list of the unauthorized headings.
It was very useful a few months ago in helping  us find and correct an
error with some imported data.

We're about to import another big batch of data, and I ran the report
again, just to check for anything that needed to be looked at first.  But
it's returning all the headings that were fixed the last time.  Could it
possibly searching cached data somewhere?  I spot checked the headings and
they are indeed properly linked. It's like I've discovered a time machine
that takes us back to our old problems!

We have re-indexed, and tried it again with the same results.


Here's the SQL for the report:

SELECT DISTINCT heading FROM (
 SELECT ExtractValue(marcxml,
'//datafield[@tag="650"]/subfield[@code="a"]') AS heading
 FROM biblioitems
 WHERE
  length(ExtractValue(marcxml,
'//datafield[@tag="650"]/subfield[@code="a"]')) != 0 AND
  length(ExtractValue(marcxml,
'//datafield[@tag="650"]/subfield[@code="9"]')) = 0
UNION
 SELECT ExtractValue(marcxml,
'//datafield[@tag="610"]/subfield[@code="a"]') AS heading
 FROM biblioitems
 WHERE
  length(ExtractValue(marcxml,
'//datafield[@tag="610"]/subfield[@code="a"]')) != 0 AND
  length(ExtractValue(marcxml,
'//datafield[@tag="110"]/subfield[@code="9"]')) = 0
UNION
 SELECT ExtractValue(marcxml,
'//datafield[@tag="600"]/subfield[@code="a"]') AS heading
 FROM biblioitems
 WHERE
  length(ExtractValue(marcxml,
'//datafield[@tag="600"]/subfield[@code="a"]')) != 0 AND
  length(ExtractValue(marcxml,
'//datafield[@tag="600"]/subfield[@code="9"]')) = 0
UNION
 SELECT ExtractValue(marcxml,
'//datafield[@tag="130"]/subfield[@code="a"]') AS heading
 FROM biblioitems
 WHERE
  length(ExtractValue(marcxml,
'//datafield[@tag="611"]/subfield[@code="a"]')) != 0 AND
  length(ExtractValue(marcxml,
'//datafield[@tag="611"]/subfield[@code="9"]')) = 0
) AS heads
ORDER BY heading

-- 
Elaine Bradtke
Data Wrangler
VWML
English Folk Dance and Song Society | http://www.efdss.org
Cecil Sharp House, 2 Regent's Park Road, London NW1 7AY
Tel    +44 (0) 20 7485 2206 (This number is for the English Folk Dance and
Song Society in London, England. If you wish to phone me personally, send
an e-mail first. I work off site)
--------------------------------------------------------------------------
Registered Company No. 297142
Charity Registered in England and Wales No. 305999
---------------------------------------------------------------------------
"Writing about music is like dancing about architecture"
--Elvis Costello (Musician magazine No. 60 (October 1983), p. 52)


More information about the Koha mailing list