[Koha] [EXTERNAL] Report help needed

Hernandez, Heather H Heather_Hernandez at nps.gov
Wed May 27 07:07:33 NZST 2020


Hi, Elaine!

I am the newbiest of SQL report newbies, but I tend to "speak MARC21," and found a different report on the Koha Wiki that I was able to tweak and it seems to work in our catalog to retrieve all bibs with a Leader position 06 value of "a:"

SELECT biblionumber, title, author, ExtractValue(metadata,'//leader') AS "Leader Field", SUBSTRING(ExtractValue(metadata,'//leader'),7,1) AS "Position05"
FROM biblio
LEFT JOIN biblio_metadata USING (biblionumber)
WHERE SUBSTRING(ExtractValue(metadata,'//leader'),7,1) = 'a'

If you change that final little 'a' to, e.g., 'e' you get all the cartographic resources.  The "7" somehow gets you position 6, and "6" would get you position 5 in the Leader...somehow.

Cheerio!
h2

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Ms. Heather Hernandez (she, her, hers)
Technical Services Librarian
San Francisco Maritime National Historical Park Research Center
2 Marina Blvd., Bldg. E, 3rd floor, San Francisco, CA  94123-1284
415-561-7032, heather_hernandez at nps.gov<https://webmail.lmi.net/src/compose.php?send_to=heather_hernandez%40nps.gov>
Library catalog: http://keys.bywatersolutions.com/


More information about the Koha mailing list