Summary: | WHERE clause doesn't like % in CONCAT | ||
---|---|---|---|
Product: | Koha | Reporter: | Christopher Brannon <cbrannon> |
Component: | Reports | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | jonathan.druart, josef.moravec |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Bug Depends on: | 9634 | ||
Bug Blocks: |
Description
Christopher Brannon
2018-11-28 20:06:47 UTC
More specifically, the CONCAT does not work in the download now with the % if the field is blank. If I have anything else, it works fine, but displaying and downloading. If I use CONCAT(IFNULL(<<Gimme>>,""),"%"), it works. Something has changed (only with downloads) that causes the report to barf if the field is blank (null). I have tried: - Create a new report from SQL SELECT itemnumber, itemcallnumber FROM items WHERE itemcallnumber LIKE CONCAT(<<Start of call number>>,'%') - Execute - Enter "a" => Return 2 results - Export (csv, tab, ods) => Return 2 results on master (In reply to Jonathan Druart from comment #3) > I have tried: > - Create a new report from SQL > > SELECT itemnumber, itemcallnumber FROM items WHERE itemcallnumber LIKE > CONCAT(<<Start of call number>>,'%') > > - Execute > - Enter "a" > => Return 2 results > - Export (csv, tab, ods) > => Return 2 results > > on master And what happens if you don't fill in the field? Ha! That was the important bit indeed :) (In reply to Jonathan Druart from comment #6) > At first glance it is caused by bug 9634. That would be my guess. It broke after this was introduced. |