<font size="2"><font face="verdana,sans-serif">Hi Nicole,<br><br>This query should work:<br><br>select title, IF( LOCATE('<datafield tag="245"', biblioitems.marcxml) = 0 OR LOCATE('<subfield code="b">', biblioitems.marcxml, LOCATE('<datafield tag="245"', biblioitems.marcxml)) = 0 OR LOCATE('<subfield code="b">', biblioitems.marcxml, LOCATE('<datafield tag="245"', biblioitems.marcxml)) > LOCATE('</datafield>', biblioitems.marcxml, LOCATE('<datafield tag="245"', biblioitems.marcxml)), '', SUBSTRING( biblioitems.marcxml, LOCATE('<subfield code="b">', biblioitems.marcxml, LOCATE('<datafield tag="245"', biblioitems.marcxml)) + 19, LOCATE('</subfield>', biblioitems.marcxml, LOCATE('<subfield code="b">', biblioitems.marcxml, LOCATE('<datafield tag="245"', biblioitems.marcxml)) + 19) - (LOCATE('<subfield code="b">', biblioitems.marcxml, LOCATE('<datafield tag="245"', biblioitems.marcxml)) + 19))) AS 'Sub-title' FROM biblioitems, biblio where biblioitems.biblionumber = biblio.biblionumber and LOCATE('<datafield tag="245"', biblioitems.marcxml) != 0 ORDER BY title asc<br>
<br><br clear="all"></font></font><br>* * * * <br>Beverly Church <br>LibLime Project Manager<br><br>phone: 1-888-564-2457 ext. 717 <br> 1-301-654-8088 ext. 292<br>email: <a href="mailto:bchurch@liblime.com" target="_blank">bchurch@liblime.com</a><br>
skype: beverlychurch<br>
<br><br><div class="gmail_quote">On Wed, May 25, 2011 at 12:10 PM, 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;">
I'm looking for some help with using the marc xml reports trick :)<br>
<br>
I need a report that shows the title and the subtitle, how would I do that?<br>
<br>
Thanks in advance!<br>
Nicole<br>
_______________________________________________<br>
Koha mailing list <a href="http://koha-community.org" target="_blank">http://koha-community.org</a><br>
<a href="mailto:Koha@lists.katipo.co.nz">Koha@lists.katipo.co.nz</a><br>
<a href="http://lists.katipo.co.nz/mailman/listinfo/koha" target="_blank">http://lists.katipo.co.nz/mailman/listinfo/koha</a><br>
</blockquote></div><br>