[Koha] Regarding sql query for analytical records

Suresh Kumar Tejomurtula tejoskumar at gmail.com
Thu Jun 1 03:00:22 NZST 2017


HI,

Thanks for the correction.
I updated my query and modified as below. I wanted to link the barcode in
the marc tag(773 / 0) to the items serial barcode for getting the serial
publication date and serial planned date.

In the below query all fields are having correct values except the serial
planneddate and serial published and they are blanks, as Iam not able to
link the serial barcode with the marc barcode(773/o).

SELECT ExtractValue(marcxml,'//datafield[@tag="773"]/subfield[@code="o"]')
AS accno,
ExtractValue(marcxml,'//datafield[@tag="773"]/subfield[@code="t"]') AS
Journalname,
ExtractValue(marcxml,'//datafield[@tag="690"]/subfield[@code="a"]') AS
subject,
ExtractValue(marcxml,'//datafield[@tag="300"]/subfield[@code="a"]') AS
imprint,
biblio.title as Title, biblio.author as Author,
biblio.abstract as abstract,
items.enumchron,serial.planneddate,serial.publisheddate FROM biblio
LEFT JOIN biblioitems on (biblioitems.biblionumber=biblio.biblionumber)
LEFT JOIN items on (items.biblionumber=biblio.biblionumber)
LEFT JOIN serial on (serial.biblionumber=biblio.biblionumber)
where
ExtractValue(marcxml,'//datafield[@tag="773"]/subfield[@code="o"]')>'400000'

Thanks in advance.
-- 
Regards
T. Suresh Kumar


More information about the Koha mailing list