[Koha] sql query / number of items
e-Libris Helpdesk
elibris.helpdesk at gmail.com
Sat Jan 19 07:10:36 NZDT 2013
Hi Samuel,
Try this query which assumes that the 955 data is in subfield a:
SELECT COUNT(biblioitems.biblioitemnumber) as '955 tag' FROM biblioitems
WHERE ExtractValue(biblioitems.marcxml,
'//datafield[@tag="955"]/subfield[@code="a"]') > 0
The query counts all 955 tags. It can be modified to count 955 tags in
records added on a specific date or date range.
As a test, you may want to first run this query which selects 5 records
with the 955 tag so you can check the biblio records in cataloging:
SELECT biblio.biblionumber, biblio.title, ExtractValue(biblioitems.marcxml,
'//datafield[@tag="955"]/subfield[@code="a"]') as '955 tag' FROM
biblioitems, biblio WHERE biblioitems.biblionumber = biblio.biblionumber
AND ExtractValue(biblioitems.marcxml,
'//datafield[@tag="955"]/subfield[@code="a"]') > 0 LIMIT 5
Bev
On Thu, Jan 17, 2013 at 6:27 AM, Samuel Desseaux <samuel.desseaux at ecp.fr>wrote:
> Hi,
>
> I need to write a sql query to count the number of 995 field in the
> records which i 've imported.
>
> An idea?
>
> Best,
>
> samuel
>
> _______________________________________________
> Koha mailing list http://koha-community.org
> Koha at lists.katipo.co.nz
> http://lists.katipo.co.nz/mailman/listinfo/koha
>
>
--
Customer Support
e-Libris Technologies, LLC
email: elibris.helpdesk at gmail.com <elibrishelpdesk at gmail.com>
phone: 1-877-723-9447 ext. 2
More information about the Koha
mailing list