[Koha] Need reports help

Bernardo Gonzalez Kriegel bgkriegel at gmail.com
Tue Jun 4 06:02:54 NZST 2013


Elaine,
I have the following report:

>
>
> SELECT  biblio.biblionumber,biblio.author,biblio.title,biblio.datecreated
> FROM items LEFT JOIN biblioitems on
> (items.biblioitemnumber=biblioitems.biblioitemnumber) LEFT JOIN biblio
> on (biblioitems.biblionumber=biblio.biblionumber)   WHERE
> items.homebranch='VWML' AND DATE_SUB(CURDATE(),INTERVAL 7 DAY) <=
> biblio.datecreated
>   ORDER BY biblio.title ASC
>
>
> But it only returns information if there are item records attached,  what I
> really want is a list of everything catalogued.
>

It does that because you begin you query with items table.
Perhaps this modified query could help you, but without homebranch
information

SELECT
  biblio.biblionumber,biblio.author,biblio.title,biblio.datecreated
FROM
  biblioitems
  LEFT JOIN
  biblio on (biblioitems.biblionumber=biblio.biblionumber)
WHERE DATE_SUB(CURDATE(),INTERVAL 7 DAY) <= biblio.datecreated
ORDER BY biblio.title ASC;

Regards,
Bernardo


More information about the Koha mailing list