Report help needed - filter by itemtype
I can't seem to get the report to filter on item type. Probably another typo somewhere. it works if I take out this line: biblioitems.itemtype=‘BK’ But I want to filter by books (and eventually other item types). SELECT ExtractValue(b.marcxml, '//datafield[@tag="100"]/subfield[@code="a"]'), ExtractValue(b.marcxml, '//datafield[@tag="245"]/subfield[@code="a"]'), ExtractValue(b.marcxml, '//datafield[@tag="245"]/subfield[@code="b"]'), ExtractValue(b.marcxml, '//datafield[@tag="245"]/subfield[@code="c"]'), ExtractValue(b.marcxml, '//datafield[@tag="260"]/subfield[@code="a"]'), ExtractValue(b.marcxml, '//datafield[@tag="773"]/subfield[@code="t"]'), ExtractValue(b.marcxml, '//datafield[@tag="773"]/subfield[@code="g"]'), ExtractValue(b.marcxml, '//datafield[@tag="260"]/subfield[@code="b"]'), ExtractValue(b.marcxml, '//datafield[@tag="260"]/subfield[@code="c"]'), ExtractValue(b.marcxml, '//datafield[@tag="300"]/subfield[@code="a"]'), ExtractValue(b.marcxml, '//datafield[@tag="020"]/subfield[@code="a"]'), ExtractValue(b.marcxml, '//datafield[@tag="022"]/subfield[@code="a"]'), monthname(datecreated) AS month, year(datecreated) AS year, biblionumber AS biblionumber LEFT JOIN biblioitems b USING (biblionumber) FROM biblio WHERE biblioitems.itemtype=‘BK’ AND datecreated BETWEEN <<Between (yyyy-mm-dd)>> AND <<and (yyyy-mm-dd)>> -- Elaine Bradtke Data Wrangler VWML English Folk Dance and Song Society | http://www.efdss.org Cecil Sharp House, 2 Regent's Park Road, London NW1 7AY Tel +44 (0) 20 7485 2206 (This number is for the English Folk Dance and Song Society in London, England. If you wish to phone me personally, send an e-mail first. I work off site) -------------------------------------------------------------------------- Registered Company No. 297142 Charity Registered in England and Wales No. 305999 --------------------------------------------------------------------------- "Writing about music is like dancing about architecture" --Elvis Costello (Musician magazine No. 60 (October 1983), p. 52)
Elaine Bradtke schreef op vr 06-06-2014 om 21:42 [+0100]:
WHERE biblioitems.itemtype=‘BK’ AND datecreated
You have smartquotes around the BK. You can't have smartquotes anywhere. -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF
hi, For item pull down list try this: Replace this: biblioitems.itemtype=‘BK’ with: items.itype=<<Select Itemtype|itemtypes>> On Mon, Jun 9, 2014 at 5:49 AM, Robin Sheat <robin@catalyst.net.nz> wrote:
Elaine Bradtke schreef op vr 06-06-2014 om 21:42 [+0100]:
WHERE biblioitems.itemtype=‘BK’ AND datecreated
You have smartquotes around the BK. You can't have smartquotes anywhere.
-- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF
_______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
-- *Warm Regards,Vishal Patil*Software Engineer - Nucsoft Ltd. phone: 022 32080161 www.osslabs.biz www.nucsoft.com vishal.patil@osslabs.biz <http://nucsoft.com/nucweb/images/OSS_labs.jpg>
participants (3)
-
Elaine Bradtke -
Robin Sheat -
vishal patil