[Koha] Reports by Indicator

Charles Kelley cmkelleymls at gmail.com
Thu Jan 6 15:35:28 NZDT 2022


Hi, all!

    Happy New Year, everyone!

    I know how to compile a report when a subfield has particular value. Is
there a way to compile a report when ind 1 or ind 2 has a particular value?

    Here's a sample problem: finding subject headings whose ind 2 = "4".

    The SQL SELECT statement might look something like

SELECT
        biblioitems.biblionumber AS 'Bib. Record No.',
ExtractValue(metadata, '//datafield[@tag="245"]/subfield[@code="a"]') AS
'Main Title', ExtractValue(metadata,'//datafield[@tag="650"]/subfield[@ind2
="1"]') AS 'Topical Subject'
    FROM biblioitems
    JOIN biblio_metadata ON (biblioitems.biblionumber =
biblio_metadata.biblionumber)
    WHERE ExtractValue(metadata, '//datafield[@tag="650"]/@ind2="2"') = "4"

    I've looked in the Koha wiki, but I have not successfully found hints,
instructions, sample reports, etc.

    Can anyone suggest an alternative? Maybe MarcEdit will be easier than
SQL.

    Many thanks!

-- 

    気を付けて。 /ki wo tukete/ = Take care.

    -- Charles.

    Charles Kelley, MLS
    PSC 704 Box 1029
    APO AP 96338

    Charles Kelley
    Tsukimino 1-Chome 5-2
    Tsukimino Gaadenia #210
    Yamato-shi, Kanagawa-ken
    〒242-0002 JAPAN

    +1-301-741-7122 [US cell]
    +81-80-4356-2178 [JPN cell]

    mnogojazyk at aol.com [h]
    cmkelleymls at gmail.com [p]

    linkedin.com/in/cmkelleymls <http://www.linkedin.com/in/cmkelleymls>
    Meeting Your Information Needs. Virtually.


More information about the Koha mailing list