On 4 April 2012 15:19, Nicole Engard <neng...@gmail.com> wrote:
> From here: http://manual.koha-community.org/3.6/en/XSLTiTypes.html
>
>    leader6 = a (and one of the leader7 values below)
>
>        leader7 = a
>
>        leader7 = c
>
>        leader7 = d
>
>        leader7 = m
>
>    leader6 = t
>

Something like this then

SELECT * FROM biblioitems,
(SELECT biblioitemnumber,SUBSTR(marcxml,INSTR(marcxml,
"<leader>")+8+6,1) AS leader6,SUBSTR(marcxml,INSTR(marcxml,
"<leader>")+8+7,1) AS leader7 FROM biblioitems) AS leaders
WHERE biblioitems.biblioitemnumber=leaders.biblioitemnumber AND
(leaders.leader6 = 'a' AND (leader7 IN ('a','c','d','n')) OR leader6 =
't') AND itemtypes = 'your_itemtype goes here'

Chris
_______________________________________________
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
http://lists.katipo.co.nz/mailman/listinfo/koha

Reply via email to