https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26328 --- Comment #7 from David Cook <dcook@prosentient.com.au> --- (In reply to Pablo AB from comment #6)
Why you like the most this one (except for the ABS identical to my first suggestion), instead of your alternative con comment 1? I remember that at the time your suggestion seems better.
Option 1: SELECT MAX(ABS(barcode)) FROM items WHERE barcode REGEXP '^[0-9]+$'; This query won't generate any warnings, so that's good. But it's also fairly long and a little complex. Option 2: SELECT max(cast(barcode as unsigned)) from items; This query will show "Truncated incorrect..." warnings, but it's simpler/easier to read/maintain. -- In the end, it doesn't really matter too much I think. -- You are receiving this mail because: You are watching all bug changes.