"Note that it looked like your data also had multiple entries in one 999 $c field, separated with '|'. That's weird, and this won't find that. On the other hand, you can just do "WHERE field LIKE "%|%"" to catch those." Yes, that is weird. I'm trying to figure out where it is coming from. In a few cases I've seen like the one I posted, it appears they are multiple editions of the same book, in which case the cataloguer probably duplicated the record. I haven't tested this theory out, but I could see where it might just add in another biblionumber to the string already there. On Mon, May 5, 2014 at 11:57 PM, Robin Sheat <robin@catalyst.net.nz> wrote:
Elaine Bradtke schreef op ma 05-05-2014 om 22:55 [+0100]:
I've got something that extracts the biblio numbers from the 999c. Is there any way to ask it to only show the ones that contain multiple 999c?
SELECT biblionumber, ExtractValue(marcxml, '//datafield[@tag="999"]/subfield[@code="c"]') AS comp FROM biblioitems
This is totally untested, but you might be able to use the XPath count() function in your ExtractValue. So,:
ExtractValue(marcxml, 'count(//datafield[@tag="999"]/subfield[@code="c"])')
An example here:
http://dev.mysql.com/doc/refman/5.1/en/xml-functions.html#function_extractva...
Note that it looked like your data also had multiple entries in one 999 $c field, separated with '|'. That's weird, and this won't find that. On the other hand, you can just do "WHERE field LIKE "%|%"" to catch those.
-- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF
_______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
-- 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)