SELECT biblio.biblionumber, SUBSTRING(biblioitems.marcxml, LOCATE('<subfield code="a">', biblioitems.marcxml, LOCATE('<datafield tag="029"', biblioitems.marcxml)+19), LOCATE('</subfield>', biblioitems.marcxml, LOCATE('<subfield code="a">', biblioitems.marcxml, LOCATE('<datafield tag="029"', biblioitems.marcxml)+19)) - LOCATE('<subfield code="a">', biblioitems.marcxml, LOCATE('<datafield tag="029"', biblioitems.marcxml)+19)) AS SNRefID FROM biblioitems, biblio WHERE biblioitems.biblionumber = biblio.biblionumber In this SQL query, what does the +19 do? I'm trying to write a report to pull out all the catalog records for a select group of documents by 029 subfield A. I think my current results are from the 035 A subfield which is not what I'm asking for. _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha