[Koha] Koha SQL report with MARC field

Holger Meissner Holger.Meissner at hs-gesundheit.de
Fri Jul 1 23:34:26 NZST 2022


Hello Tadas,

does this work?

SELECT
    i.dateaccessioned AS "Pridejimas",
    i.barcode AS "Barkodas",
    b.author AS "Autorius",
    b.title AS "Pavadinimas",
    bi.publishercode AS "Leidykla",
    i.copynumber AS "Inventorinis",
    bi.isbn AS "ISBN",
    i.itemnotes AS "Uzrasai",
    i.itype AS "Išteklis",
    i.homebranch AS "Lokacija",
    ExtractValue(m.metadata, '//datafield[@tag="675"]/subfield[@code="3"]') AS "Informacija"
FROM items i
LEFT JOIN biblioitems bi ON i.biblioitemnumber = bi.biblioitemnumber
LEFT JOIN biblio b ON bi.biblionumber = b.biblionumber
LEFT JOIN biblio_metadata m ON m.biblionumber = b.biblionumber
WHERE i.dateaccessioned BETWEEN <<Between Date (yyyy-mm-dd)|date>> AND <<and (yyyy-mm-dd)|date>>
ORDER BY i.barcode DESC


Regards,
Holger


More information about the Koha mailing list