Re: [Koha] Barcode as a link report

2020-05-30 Thread muiru james
Hi Katrin,

Thanks alot. It really helps and solves my case.

Most appreciated.

Warm regards
James

On Fri, May 29, 2020 at 11:59 PM Katrin Fischer 
wrote:

> Hi,
>
> you have 2 tables in your query that both have a biblionumber column:
> items and biblio.
>
> So in your query, you need to specifiy which table is meant by adding
> the name of the table it should use:
>
> SELECT CONCAT(' additem.pl?op=edititem=', biblio.biblionumber,
> '=', itemnumber, '#edititem', '\">', itemnumber, '' ) AS
>
> itemnumber,items.itemcallnumber,items.barcode,biblio.author,biblio.title,items.price
>
> ...
>
>
> Hope this helps,
>
>
> Katrin
>
> On 29.05.20 14:20, muiru james wrote:
> > Hello Mark,
> >
> > Following up on this query, this is the whole SQL query
> >
> > SELECT CONCAT(' > additem.pl?op=edititem=', biblionumber, '=',
> > itemnumber, '#edititem', '\">', itemnumber, '' ) AS
> >
> itemnumber,items.itemcallnumber,items.barcode,biblio.author,biblio.title,items.price
> >
> > FROM items
> > LEFT JOIN biblioitems on
> > (items.biblioitemnumber=biblioitems.biblioitemnumber)
> > LEFT JOIN biblio on (biblioitems.biblionumber=biblio.biblionumber)
> > WHERE items.barcode NOT LIKE 'K%'
> > AND  items.barcode NOT LIKE 'A%'
> > AND items.barcode NOT LIKE 'B%'
> > AND items.itype=<>
> > ORDER BY items.itemcallnumber asc
> >
> > The error is as under:
> >
> > *The following error was encountered:*
> > The database returned the following error:
> > Column 'biblionumber' in field list is ambiguous
> > Please check the log for further details.
> > Return to previous page
> > <
> http://127.0.1.1:8080/cgi-bin/koha/reports/guided_reports.pl?reports=37=Run+this+report_name=itype%7Citemtypes_params=BK#
> >
> >
> > If I remove author and title fields, the report runs well. I however
> would
> > need the two fields.
> >
> > Warm Regards
> >
> > On Tue, May 19, 2020 at 2:28 PM Mark Alexander  wrote:
> >
> >> Excerpts from muirunyeri's message of 2020-05-19 11:10:33 +0300:
> >>> However if anybody would help me understand why I get an error
> >> (biblionumber is ambiguous) after adding any field from biblio table
> I'd be
> >> really grateful. This after correctly adding a left join for the biblios
> >> table using biblionumber on itemnumber in items.
> >>
> >> It would help if you could post your entire query.  But my guess is
> >> that the ambiguity is the result of joining two tables that have
> >> fields with the same name.  The items and biblio tables both have a
> >> field called biblionumber.  So in your query, you have to fix the
> >> ambiguity by using the table name as a prefix: e.g.,
> >> items.biblionumber or biblio.biblionumber .
> >> ___
> >>
> >> Koha mailing list  http://koha-community.org
> >> Koha@lists.katipo.co.nz
> >> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
> >>
> > ___
> >
> > Koha mailing list  http://koha-community.org
> > Koha@lists.katipo.co.nz
> > Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
> ___
>
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Barcode as a link report

2020-05-29 Thread Katrin Fischer

Hi,

you have 2 tables in your query that both have a biblionumber column:
items and biblio.

So in your query, you need to specifiy which table is meant by adding
the name of the table it should use:

SELECT CONCAT('', itemnumber, '' ) AS
itemnumber,items.itemcallnumber,items.barcode,biblio.author,biblio.title,items.price

...


Hope this helps,


Katrin

On 29.05.20 14:20, muiru james wrote:

Hello Mark,

Following up on this query, this is the whole SQL query

SELECT CONCAT('', itemnumber, '' ) AS
itemnumber,items.itemcallnumber,items.barcode,biblio.author,biblio.title,items.price

FROM items
LEFT JOIN biblioitems on
(items.biblioitemnumber=biblioitems.biblioitemnumber)
LEFT JOIN biblio on (biblioitems.biblionumber=biblio.biblionumber)
WHERE items.barcode NOT LIKE 'K%'
AND  items.barcode NOT LIKE 'A%'
AND items.barcode NOT LIKE 'B%'
AND items.itype=<>
ORDER BY items.itemcallnumber asc

The error is as under:

*The following error was encountered:*
The database returned the following error:
Column 'biblionumber' in field list is ambiguous
Please check the log for further details.
Return to previous page


If I remove author and title fields, the report runs well. I however would
need the two fields.

Warm Regards

On Tue, May 19, 2020 at 2:28 PM Mark Alexander  wrote:


Excerpts from muirunyeri's message of 2020-05-19 11:10:33 +0300:

However if anybody would help me understand why I get an error

(biblionumber is ambiguous) after adding any field from biblio table I'd be
really grateful. This after correctly adding a left join for the biblios
table using biblionumber on itemnumber in items.

It would help if you could post your entire query.  But my guess is
that the ambiguity is the result of joining two tables that have
fields with the same name.  The items and biblio tables both have a
field called biblionumber.  So in your query, you have to fix the
ambiguity by using the table name as a prefix: e.g.,
items.biblionumber or biblio.biblionumber .
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha

___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


[Koha] Barcode as a link report

2020-05-29 Thread muiru james
Hello Mark,

Following up on this query, this is the whole SQL query

SELECT CONCAT('', itemnumber, '' ) AS
itemnumber,items.itemcallnumber,items.barcode,biblio.author,biblio.title,items.price

FROM items
LEFT JOIN biblioitems on
(items.biblioitemnumber=biblioitems.biblioitemnumber)
LEFT JOIN biblio on (biblioitems.biblionumber=biblio.biblionumber)
WHERE items.barcode NOT LIKE 'K%'
AND  items.barcode NOT LIKE 'A%'
AND items.barcode NOT LIKE 'B%'
AND items.itype=<>
ORDER BY items.itemcallnumber asc

The error is as under:

*The following error was encountered:*
The database returned the following error:
Column 'biblionumber' in field list is ambiguous
Please check the log for further details.
Return to previous page


If I remove author and title fields, the report runs well. I however would
need the two fields.

Warm Regards

On Tue, May 19, 2020 at 2:28 PM Mark Alexander  wrote:

> Excerpts from muirunyeri's message of 2020-05-19 11:10:33 +0300:
> > However if anybody would help me understand why I get an error
> (biblionumber is ambiguous) after adding any field from biblio table I'd be
> really grateful. This after correctly adding a left join for the biblios
> table using biblionumber on itemnumber in items.
>
> It would help if you could post your entire query.  But my guess is
> that the ambiguity is the result of joining two tables that have
> fields with the same name.  The items and biblio tables both have a
> field called biblionumber.  So in your query, you have to fix the
> ambiguity by using the table name as a prefix: e.g.,
> items.biblionumber or biblio.biblionumber .
> ___
>
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Barcode as a link report

2020-05-19 Thread Mark Alexander
Excerpts from muirunyeri's message of 2020-05-19 11:10:33 +0300:
> However if anybody would help me understand why I get an error (biblionumber 
> is ambiguous) after adding any field from biblio table I'd be really 
> grateful. This after correctly adding a left join for the biblios table using 
> biblionumber on itemnumber in items.

It would help if you could post your entire query.  But my guess is
that the ambiguity is the result of joining two tables that have
fields with the same name.  The items and biblio tables both have a
field called biblionumber.  So in your query, you have to fix the
ambiguity by using the table name as a prefix: e.g.,
items.biblionumber or biblio.biblionumber . 
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Barcode as a link report

2020-05-19 Thread muirunyeri
Hello Mark,
Thanks for pointing me to that direction. The itemnumber link does open the 
edit item page I was looking for. 
However if anybody would help me understand why I get an error (biblionumber is 
ambiguous) after adding any field from biblio table I'd be really grateful. 
This after correctly adding a left join for the biblios table using 
biblionumber on itemnumber in items.
Without the fields from biblio, the report works runs successfully.
Warm regards James


Sent from my Samsung Galaxy smartphone. Original message From: 
Mark Alexander  Date: 18/05/2020  16:06  (GMT+03:00) To: koha 
 Subject: Re: [Koha] [koha] Barcode as a link report 
Excerpts from muirunyeri's message of 2020-05-18 13:05:56 +0300:
> I'm looking to create a report with barcode as a link that when will clicked 
> will open the edit items page.

There are some examples here that might help:

https://wiki.koha-community.org/wiki/SQL_Reports_Library#Links_by_item
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] [koha] Barcode as a link report

2020-05-18 Thread Mark Alexander
Excerpts from muirunyeri's message of 2020-05-18 13:05:56 +0300:
> I'm looking to create a report with barcode as a link that when will clicked 
> will open the edit items page.

There are some examples here that might help:

https://wiki.koha-community.org/wiki/SQL_Reports_Library#Links_by_item
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


[Koha] [koha] Barcode as a link report

2020-05-18 Thread muirunyeri

Hello team
I hope you all keeping safe
I'm looking to create a report with barcode as a link that when will clicked 
will open the edit items page.
Kindly assist.
Warm Regards James

Sent from my Samsung Galaxy smartphone.
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha