SQL report with Comma Delimited Paramater
Is it possible to create a SQL report using a parameter with comma delimited ids? Specifically I would like to be able to select random, non-contiguous items. The following sql statement works when called directly from mysql: *select * from items where barcode in (3456,2346);* However, when I create a sql report with the following code: *select * from items where barcode in (<<Enter Barcodes>>)* it works if I enter 1 barcode, but fails if I enter 2 barcodes separated by a comma. Is there any workaround for this? -- Sent from: http://koha.1045719.n5.nabble.com/Koha-general-f3047918.html
This is not currently possible, but if you check the bywatersolutions github page, you can find a plugin called 'koha-plugin-reports-plus', or something similar (on mobile, or I'd link to it). That plugin will allow you to add a parameter that lets you enter a list. On Wed, Jun 6, 2018, 07:38 ksorbo <keith@thesorbos.com> wrote:
Is it possible to create a SQL report using a parameter with comma delimited ids?
Specifically I would like to be able to select random, non-contiguous items.
The following sql statement works when called directly from mysql: *select * from items where barcode in (3456,2346);*
However, when I create a sql report with the following code: *select * from items where barcode in (<<Enter Barcodes>>)* it works if I enter 1 barcode, but fails if I enter 2 barcodes separated by a comma.
Is there any workaround for this?
-- Sent from: http://koha.1045719.n5.nabble.com/Koha-general-f3047918.html _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
On 6 June 2018 at 15:17, Barton Chittenden <barton@bywatersolutions.com> wrote:
This is not currently possible, but if you check the bywatersolutions github page, you can find a plugin called 'koha-plugin-reports-plus', or something similar (on mobile, or I'd link to it). That plugin will allow you to add a parameter that lets you enter a list.
Probably this one? https://github.com/bywatersolutions/koha-plugin-reports-plus I have added it to https://wiki.koha-community.org/wiki/Koha_plugins Best regards, Magnus Libriotech
Yes, that's the one. Thanks! On Tue, Jun 12, 2018 at 7:31 AM, Magnus Enger <magnus@enger.priv.no> wrote:
On 6 June 2018 at 15:17, Barton Chittenden <barton@bywatersolutions.com> wrote:
This is not currently possible, but if you check the bywatersolutions github page, you can find a plugin called 'koha-plugin-reports-plus', or something similar (on mobile, or I'd link to it). That plugin will allow you to add a parameter that lets you enter a list.
Probably this one? https://github.com/bywatersolutions/koha-plugin- reports-plus
I have added it to https://wiki.koha-community.org/wiki/Koha_plugins
Best regards, Magnus Libriotech _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
participants (3)
-
Barton Chittenden -
ksorbo -
Magnus Enger