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 <[email protected]>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 > [email protected] > http://lists.katipo.co.nz/mailman/listinfo/koha > > -- Customer Support e-Libris Technologies, LLC email: [email protected] <[email protected]> phone: 1-877-723-9447 ext. 2 _______________________________________________ Koha mailing list http://koha-community.org [email protected] http://lists.katipo.co.nz/mailman/listinfo/koha

