[Koha] Report help

Nicole Engard nengard at gmail.com
Wed Apr 15 03:05:35 NZST 2015


Hi all,

I'm working on this report and I want there to be a BR between each
distinct 650a - but for some reason it's not working. I worked on this
in channel for a while and you can see the log here:
http://irc.koha-community.org/koha/2015-04-14#i_1663170

Here's the report:


Select b.biblionumber, GROUP_CONCAT(DISTINCT ExtractValue(m.marcxml,
'//datafield[@tag="650"]/subfield[@code="a"]') SEPARATOR ' BR ') AS
'Subject',i.itype AS 'IType'
FROM biblio b
LEFT JOIN biblioitems m using (biblionumber)
left join items i using (biblioitemnumber)
WHERE i.location in
('ARCHIVES','ARCHSIZE','HISTORYMED','HISTMEDOVZ','HISTMEDREF','RAREBKROOM','RAREOVRSIZ')
and i.itype != 'JOURNAL' and ExtractValue(m.marcxml,
'//datafield[@tag="650"]/subfield[@code="a"]') is not null and
ExtractValue(m.marcxml, '//datafield[@tag="650"]/subfield[@code="a"]')
!= ''
group by i.biblionumber
ORDER BY b.biblionumber



Thanks in advance!
Nicole


More information about the Koha mailing list