[Koha] Looking to Query Indicators

Heather Braum (NEKLS) hbraum at nekls.org
Wed Oct 16 06:33:21 NZDT 2013


Nicole, We have a report on our system that looks for 490 tags with the 1
indicator first.

Here's the SQL statement:

select b.biblionumber, b.title, b.author from biblio b join biblioitems i
using (biblionumber) where i.marcxml like  '%datafield tag="490" ind1="1"%'

Maybe work with that statement idea, and see what that gets you? (I'm on a
flight to Kohacon, and don't want to try waiting on querying our database
too much on slower wifi). Good luck!

Heather Braum
NExpress Coordinator
Resource Sharing Librarian
Northeast Kansas Library System
hbraum at nekls.org

"The illiterate of the 21st century will not be those cannot read
and write, but those who cannot learn, unlearn, and relearn." ~Alvin
Toffler, *Rethinking the Future*





On Tue, Oct 15, 2013 at 12:20 PM, Nicole Engard <nengard at gmail.com> wrote:

> Hi all,
>
> Anyone know if there is a way to query a marc field based on the indicator
> value.
>
> I have this report (which works):
>
> select b.title, b.author,
> ExtractValue(m.marcxml,'//datafield[@tag="521"]/subfield[@code>="a"]') AS
> lexile from biblio b left join biblioitems m using (biblionumber) where
> ExtractValue(m.marcxml,'//datafield[@tag="521"]/subfield[@code>="a"]')
> between <<Lexile between>> and <<and>>
>
> But I want to only query 521s that have a 8# in the indicators.  My report
> will find all of the below:
>
> 521 2# - TARGET AUDIENCE NOTE
> Target audience note 4-8.
> 521 0# - TARGET AUDIENCE NOTE
> Target audience note 8.8.
> 521 8# - TARGET AUDIENCE NOTE
> Target audience note 1150
>
> But I only want the last one.
>
> Nicole
> _______________________________________________
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> http://lists.katipo.co.nz/mailman/listinfo/koha
>


More information about the Koha mailing list