[Koha] sql query

rogan.hamby at gmail.com rogan.hamby at gmail.com
Wed Nov 11 02:36:44 NZDT 2020


Hello,

You're 99% of the way there already, you are already using the items table
so you just need to add "items.ccode,items.location," in the appropriate
place, like this:


SELECT items.Barcode,biblio.Author,biblio.Title AS
Titles,biblioitems.Pages,biblioitems.Editionstatement AS
Edition,biblio.Copyrightdate AS Year,items.Price,biblioitems.publishercode
AS Publisher,biblioitems.Place,biblio.unititle AS Subject,items.location AS
Department,biblioitems.itemtype AS Department,items.itype AS
Status,biblioitems.url AS
OnlineURL,
items.ccode,items.location,
items.Dateaccessioned,biblioitems.ISBN,biblio.notes,biblio.Serial,items.Issues,items.Renewals
FROM items
LEFT JOIN biblioitems ON
(items.biblioitemnumber=biblioitems.biblioitemnumber)
LEFT JOIN biblio ON (biblioitems.biblionumber=biblio.biblionumber)
ORDER BY LPAD(items.barcode,40,' ') ASC

On Tue, Nov 10, 2020 at 3:50 AM Yatheesh lis <yatheeshb at gmail.com> wrote:

> Hi
>
> I would like to add the following fields to sql query after OnlineURL
>
> koha 19.05
>
> 1. 8 - Collection code
> 2.c - Shelving location
>
>
>
> SELECT items.Barcode,biblio.Author,biblio.Title AS
> Titles,biblioitems.Pages,biblioitems.Editionstatement AS
> Edition,biblio.Copyrightdate AS Year,items.Price,biblioitems.publishercode
> AS Publisher,biblioitems.Place,biblio.unititle AS Subject,items.location AS
> Department,biblioitems.itemtype AS Department,items.itype AS
> Status,biblioitems.url AS
>
> OnlineURL,items.Dateaccessioned,biblioitems.ISBN,biblio.notes,biblio.Serial,items.Issues,items.Renewals
> FROM items
> LEFT JOIN biblioitems ON
> (items.biblioitemnumber=biblioitems.biblioitemnumber)
> LEFT JOIN biblio ON (biblioitems.biblionumber=biblio.biblionumber)
> ORDER BY LPAD(items.barcode,40,' ') ASC
>
> please help me
> --
>
> Y.Yatheesh Babu
> 8247838231
> _______________________________________________
>
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>


More information about the Koha mailing list