[Koha] 856 Field and SQL Query
Stephen Graham
s.graham4 at herts.ac.uk
Wed Jul 22 22:19:59 NZST 2020
Thanks ever so much Ian. I don't think I would have spotted that.
Stephen
-----Original Message-----
From: Koha <koha-bounces at lists.katipo.co.nz> On Behalf Of Ian Bays
Sent: 22 July 2020 10:05
To: koha at lists.katipo.co.nz
Subject: Re: [Koha] 856 Field and SQL Query
Hi Graham,
You are using ">=" in the subfield construct. If you want just the subfield u as URL you should just use "=". Similarly in the other ExtractValue constructs.
All the best.
Ian
On 22/07/2020 08:20, Stephen Graham wrote:
> (sorry if you have received this twice, my email client crashed when I
> sent yesterday - and not sure if it actually sent)
>
> 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>
>
> _______________________________________________
>
> Koha mailing list http://koha-community.org Koha at lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
>
--
Ian Bays
Director, PTFS Europe Limited
Content Management and Library Solutions
+44 (0) 7774 995297 (mobile)
skype: ian.bays
email: ian.bays at ptfs-europe.com
_______________________________________________
Koha mailing list http://koha-community.org
Koha at lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
More information about the Koha
mailing list