[Koha] loop over subjects (in SQL report)

Giuseppe Angilella Giuseppe.Angilella at ct.infn.it
Mon Dec 12 06:14:38 NZDT 2016


Hi,

I would like to list records by subject (in a SQL report).

I can isolate the first subject in a record with

ExtractValue(biblioitems.marcxml,'//datafield[substring(@tag,1,1) = "6"][1]/subfield[@code>="a"]')

But then I need to perform a UNION DISTINCT with another SELECT addressing 
the second subject (with 2 replacing 1 between square brackets above), 
etc, when records can have a much larger number of subjects (MARC field 
starting with 6).

Any suggestion?

Thanks,

Giuseppe.


More information about the Koha mailing list