[Koha] How to leave null value in SQL Report

Vimal Kumar V. vimal0212 at gmail.com
Tue Mar 8 18:37:31 NZDT 2016


Dear Friends,
Here is a report which list books with accompanying materials (field 300$e).
How can I leave null values in 300$e and list only exact values?


SELECT
ExtractValue(marcxml,'//datafield[@tag="300"]/subfield[@code="e"]') AS
AccoMaterial,
DATE_FORMAT(items.dateaccessioned, "%d %b %Y %h:%i %p") AS
Date_accessioned,items.barcode,items.itemcallnumber,biblioitems.isbn,biblio.author,biblio.title,ExtractValue(marcxml,'//datafield[@tag="654"]/subfield[@code="a"]')
AS
SUBJECT,biblioitems.pages,biblioitems.publishercode,biblioitems.place,biblio.copyrightdate

FROM items
LEFT JOIN biblioitems ON
(items.biblioitemnumber=biblioitems.biblioitemnumber)
LEFT JOIN biblio ON (biblioitems.biblionumber=biblio.biblionumber)
WHERE items.homebranch=<<Home branch|branches>>
AND biblioitems.itemtype = <<Item Type|itemtypes>>
ORDER BY items.barcode ASC


Regards,
-- 
Vimal Kumar V.
Technical Assistant
Mahatma Gandhi University Library
Kottayam, Kerala- 686 560
Web: http://www.vimalkumar.info
Blog: http://linuxhalwa.blogspot.com http://kohageek.blogspot.in
http://moovandan.blogspot.in
---------------------------------------------------------------------------
"I forget what I was taught. I only remember what I have learnt"
-Patrick White


More information about the Koha mailing list