[Koha] Report Help

Chris Nighswonger cnighswonger at foundations.edu
Sat Jul 2 01:39:30 NZST 2011


 Hi Nicole,

On Fri, Jul 1, 2011 at 9:33 AM, Nicole Engard <nengard at gmail.com> wrote:

> Hi all,
>
> I wrote this report to get all subject headings in a Koha system that
> start with key phrases:
>
> SELECT lcsh
> FROM
> (SELECT biblionumber,
> ExtractValue(marcxml,'//datafield[@tag="610"]/subfield[@code>="a"]')
> AS lcsh FROM biblioitems)
> AS subjects
> WHERE lcsh
> LIKE "College%"
> OR lcsh LIKE "Seminary%"
> GROUP BY lcsh
>
>
> What's happening is if there is more than one 610 on a bib record it's
> showing them both on one line.  I tried using DISTINCT, but that's
> didn't do the trick, so I'm up for ideas.
>

I did some work with ExtractValue and marcxml a while back and IIRC this has
to do with the way ExtractValue returns the data from the xml. I was unable
to find a workaround at the time, but perhaps someone else has found one.

Kind Regards,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.katipo.co.nz/pipermail/koha/attachments/20110701/64f85d24/attachment.htm 


More information about the Koha mailing list