[Koha] Report question

Francois Charbonnier francois.charbonnier at inlibro.com
Fri Apr 22 04:14:12 NZST 2016


Hi Stephen,

I don't see any workaround but right now, it can't work.

Let's say the <<BIBIDS>> value is : 34,35,36

With the IN operator, you have to get the query this way : IN(34,35,36) 
but with the <<BIBIDS>>, you'll get IN('34,35,36') instead. The query 
will look for the expression '34,35,36' which is not a biblionumber. 
Therefore, you don't have any result.

I guess you could use multiple "OR"...

Hope it helps!

François Charbonnier,
Bibl. prof. / Chef de produits

Tél.  : (888) 604-2627
francois.charbonnier at inLibro.com <mailto:francois.charbonnier at inLibro.com>

inLibro | pour esprit libre | www.inLibro.com <http://www.inLibro.com>
Le 2016-04-21 11:16, Graham, Stephen a écrit :
> Hi All - I want to set up a SQL report that can take a variable number of the same value. My SQL looks like:
>
> select
> biblionumber,
> concat (branchname, ', ', lib) as location,
> itemcallnumber,
> if(onloan is null,'Available',onloan) onloan
> from items,authorised_values,branches
> where biblionumber in (<<BIBIDS>>)
> and authorised_values.category = 'LOC'
> and items.location = authorised_values.authorised_value
> and items.homebranch = branches.branchcode
>
> I want the <<BIBIDS>> value to be able to receive several values when I run the report from the staff client, but I cannot get it to work. Any advice/tips much welcome!
>
> Stephen
>
> Stephen Graham
> Online Information Manager
> Information Collections and Services
> Library and Computing Services
> University of Hertfordshire
> Hatfield  AL10 9AB
> UK
> Tel. 01707 286111 Ext: 77751
> Email s.graham4 at herts.ac.uk
>
> _______________________________________________
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> https://lists.katipo.co.nz/mailman/listinfo/koha



More information about the Koha mailing list