[Koha-devel] 855 Field and SQL Query

Stephen Graham s.graham4 at herts.ac.uk
Tue Jul 21 17:23:28 CEST 2020


Hi All - when I try and pull out subfield $u of the 856 field I always get the public note as well (i.e. $z). An example of the query I'm running:

select
  biblionumber,
  ExtractValue(metadata,'//datafield[@tag="245"]/subfield[@code>="a"]') AS title,
  ExtractValue(metadata,'//datafield[@tag="856"]/subfield[@code>="u"]') as URL
from
  biblio_metadata
where
  ExtractValue(metadata,'//datafield[@tag="856"]/subfield[@code>="u"]') like '%dawsonera.com%';

This is correct isn't it? I haven't requested $z, so not sure why it is always in the results? Feature? Bug? Or me doing something wrong?

Cheers, Stephen

PS we are on 19.11.

--------------------------------------
Stephen Graham
Library Technology Consultant
Content and Collections Team
Library and Computing Services
University of Hertfordshire
Tel: 01707 286111
Ext: 77751
Email: s.graham4 at herts.ac.uk<mailto:s.graham4 at herts.ac.uk>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20200721/4bd54e0d/attachment.htm>


More information about the Koha-devel mailing list