vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| A naive question: why does: "x" LIKE "% %" ...evaluate to false but: "x" LIKE "x %" ...evaluate to true? (The same is true of MATCHES with *s instead of %s.) I realise it has something to do with the trimming of trailing whitespace before comparison (eg, "x" = "x ") - but I can't see why the first example doesn't attempt to evaluate the same thing as the second example as it attempts to match the wildcards. [I've tried this on IDS 7.31.UD9, 9.40.UC7 and 10.00.FC4] |
| ||||
| Bruce Preston wrote: > A naive question: why does: > > "x" LIKE "% %" > > ..evaluate to false but: > > "x" LIKE "x %" > > ..evaluate to true? (The same is true of MATCHES with *s instead of > %s.) > > I realise it has something to do with the trimming of trailing > whitespace before comparison (eg, "x" = "x ") - but I can't see why > the first example doesn't attempt to evaluate the same thing as the > second example as it attempts to match the wildcards. > > [I've tried this on IDS 7.31.UD9, 9.40.UC7 and 10.00.FC4] Report it to Tech Support - I think it is most likely a bug. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/ |