[Koha] 942 c searching and generating reports

Chris Cormack chrisc at catalyst.net.nz
Thu Dec 15 13:58:55 NZDT 2011


* Elaine Bradtke (eb at efdss.org) wrote:
> The problem:
> I need to batch edit a group of biblios, but first I have to find them
> and extract a list of their biblio numbers.
> All the biblios in question have a common trait: their 942$c is Components
> They also do not have item records
> 
> But I can't seem to create a report that will do this (my grasp of the
> whole report function is rather feeble).
> Any advice?
> 
> Now for the inevitable weirdness:
> 
> I know there are over 70 biblios with Components in the 942$c field.
> 
> I created a report that lists all the biblionumbers and itemtypes. The
> only Components that report produced were ones that had been manually
> entered.  Not the 70+ that came in via a bulk import.
> If I search for the items individually by title, etc. they are there
> and appear to be normal records.
> If I try to limit an advance search to Components, it draws a blank.
> Which makes me think there's something fishy going on somewhere.  But
> where to look?
> 
Hi Elaine

I bet the ones imported just have the data in the marcxml field, so in
order to find them you would use some sql like

SELECT biblionumber FROM (SELECT biblionumber, ExtractValue(marcxml,
'//datafield[@tag="942"]/subfield[@code="c"]') AS comp FROM
biblioitems) as comptable WHERE comp="Components";

Try that and see if you get at least 70 biblionumbers back

One caveat, your mysql server needs to be running at least 5.1.5 for
this query to work (most modern installs will be)

Hope this helps

Chris

-- 
Chris Cormack
Catalyst IT Ltd.
+64 4 803 2238
PO Box 11-053, Manners St, Wellington 6142, New Zealand
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.katipo.co.nz/pipermail/koha/attachments/20111215/a83ce1f8/attachment.pgp>


More information about the Koha mailing list