Thanks Katrin – I think that has worked! Thank you for your help. Kerrie Stevens
From: Katrin [mailto:katrin.fischer...@web.de] Sent: Thursday, April 13, 2017 8:36 AM To: Kerrie Stevens <kstev...@harvest.edu.au> Cc: koha@lists.katipo.co.nz Subject: Re: [Koha] SQL help please Hi Kerry, you are right, I think this one should be better: SELECT i.itemnumber, i.biblionumber, b.title, b.author, i.itemcallnumber, i.barcode, i.homebranch FROM items i LEFT JOIN biblio b ON (i.biblionumber=b.biblionumber) WHERE homebranch = "QLD" AND i.biblionumber not in (select distinct i2.biblionumber from items i2 where homebranch != "QLD") ORDER BY i.itemcallnumber If you want holdingbranch instead of holdingbranch you can just replace it. Hope this works, Katrin On 12.04.2017 23:52, Kerrie Stevens wrote: SELECT i.itemnumber, b.title, b.author, i.itemcallnumber, i.barcode, i.homebranch FROM items i LEFT JOIN biblio b ON (i.biblionumber=b.biblionumber) WHERE homebranch = "QLD" AND i.biblionumber not in (SELECT biblionumber FROM items WHERE i.homebranch != "QLD") ORDER BY i.itemcallnumber _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha