Re: [Koha] Report help needed
At 09:00 AM 9/28/2015 -0400, Barton Chittenden wrote:
Elaine,
This query should do what you're looking for:
select biblionumber, from biblioitems where ExtractValue( marcxml, '//datafield[@tag=942]/subfield[@code="c"]' ) = '';
Depending on the number of bibs, this could take quite a while to run -- I would try it after hours.
Don't use a comma after biblionumber... And it's fairly fast -- I removed a 942$c to test it, and got: mysql> SELECT biblionumber FROM biblioitems WHERE ExtractValue(marcxml,'//datafield[@tag=942]/subfield[@code="c"]') = ''; +--------------+ | biblionumber | +--------------+ | 42419 | +--------------+ 1 row in set (0.26 sec) Best -- Paul
Alternatively, if you have 942$c mapped in your biblio-marc mappings, you could try querying the filed that it's mapped to, which would look a bit like this:
select biblionumber from biblioitems where FOO is NULL;
where FOO is the column in question (FOO could conceivably be in items or biblio... adjust the query above accordingly). This would run much faster than the ExtractValue query.
--Barton _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
--- Maritime heritage and history, preservation and conservation, research and education through the written word and the arts. <http://NavalMarineArchive.com> and <http://UltraMarine.ca>
participants (1)
-
Paul A