Hi Nicole,<br><br><div class="gmail_quote">On Fri, Jul 1, 2011 at 9:33 AM, Nicole Engard <span dir="ltr"><<a href="mailto:nengard@gmail.com">nengard@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi all,<br>
<br>
I wrote this report to get all subject headings in a Koha system that<br>
start with key phrases:<br>
<br>
SELECT lcsh<br>
FROM<br>
(SELECT biblionumber,<br>
ExtractValue(marcxml,'//datafield[@tag="610"]/subfield[@code>="a"]')<br>
AS lcsh FROM biblioitems)<br>
AS subjects<br>
WHERE lcsh<br>
LIKE "College%"<br>
OR lcsh LIKE "Seminary%"<br>
GROUP BY lcsh<br>
<br>
<br>
What's happening is if there is more than one 610 on a bib record it's<br>
showing them both on one line. I tried using DISTINCT, but that's<br>
didn't do the trick, so I'm up for ideas.<br></blockquote></div><br>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.<br>
<br>Kind Regards,<br>Chris<br>