LINUX, FOSS AND LIBRARY TECHNOLOGY ENTHUSIAST

Sunday, January 26, 2020

SQL Syntax for Creating Accession Register from Koha ILMS

0 comments

Processionals often ask me on how to generate a report that contains necessary Marc tags including subject heading/keyword for a Accession Register. Here is the SQL syntax that can be used for the purpose just copy and past it on New SQL report in Koha report module.

 

SELECT biblioitems.isbn,biblio.author,biblio.title,biblioitems.editionstatement,biblioitems.place,biblioitems.publishercode,biblio.copyrightdate,biblioitems.pages,ExtractValue( metadata, '//datafield[@tag="650"]/subfield[@code="a"]' ) AS keyword,items.itype,items.ccode,items.homebranch,items.holdingbranch,items.location,items.dateaccessioned,items.booksellerid,items.price,items.enumchron,items.itemcallnumber,items.barcode

FROM items LEFT JOIN biblioitems on (items.biblioitemnumber=biblioitems.biblioitemnumber) LEFT JOIN biblio on (biblioitems.biblionumber=biblio.biblionumber)

JOIN biblio_metadata ON (biblioitems.biblionumber = biblio_metadata.biblionumber)

ORDER BY LPAD(items.barcode,40,' ') ASC

No comments:

Post a Comment