Re: [Koha] Report to find biblios without dates in 008 - needs work

2014-07-24 Thread Bernardo Gonzalez Kriegel
Hi Elaine, First, the query must use HAVING instead of WHERE, Date is not a column but an alias to some result. Second, better to check that Date is not a number SELECT biblionumber, SUBSTR(ExtractValue(m.marcxml,'//controlfield[@tag=008]'),8,4) as Date FROM biblioitems m LEFT JOIN biblio b

[Koha] Report to find biblios without dates in 008 - needs work

2014-07-23 Thread Elaine Bradtke
I'm halfway there: SELECT biblionumber, SUBSTR(ExtractValue(m.marcxml,'//controlfield[@tag=008]'),8,4) as Date FROM biblioitems m LEFT JOIN biblio b USING (biblionumber) WHERE Date = '' Doesn't quite work. If I omit the last line, it spits out a list of all our biblios, and the date. I'd