Bug #471 | In correct result for the Field1+Field2 in like condition. | ||
---|---|---|---|
Submitted: | 21 May 2003 7:44 | Modified: | 21 May 2003 8:04 |
Reporter: | somsamai pokchai | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.0.12 | OS: | Linux (linux and windows platform) |
Assigned to: | CPU Architecture: | Any |
[21 May 2003 7:44]
somsamai pokchai
[21 May 2003 8:04]
Indrek Siitan
If you add up the two values in your example, they will be 345, 2907 and 222. None of them match %12%, so an empty result set is a completely expected result. If you are just trying to find records that contain 12 in either bilno or bildesc, the correct queries would be: SELECT bilno,bildesc FROM tbgltrn WHERE concat(bilno,bildesc) like '%12%'; SELECT bilno,bildesc FROM tbgltrn WHERE bilno like '%12%' or bildesc like '%12%';