Weirdness with escaped characters in WHERE clauses....
Posted in 1994
Has anyone seen this before:
ISQL
SELECT * FROM tab1 WHERE ch1 MATCHES "*\\?*"
works fine...returning all rows where column ch1 contains
a question mark (?).
4GL
DECLARE c_fa CURSOR FOR
SELECT * FROM tab1 WHERE ch1 MATCHES '*\\?*'
returns all the rows in table tab1.
But, if I use
DECLARE c_fa CURSOR FOR
SELECT * FROM tab1 WHERE ch1 MATCHES '*z?*' ESCAPE "z"
works fine...returninf the same rows as the ISQL statement.
What gives?!? Is this a bug?
--
-------------------------------------------------------------------------------
Mike Reetz reetz@ncar.ucar.edu 3450 Mitchell Lane
UNIX(tm) Operations Manager (303)497-8881(V) 497-8501(Fax) Building 1
UCAR - University Corporation For Atmospheric Research Boulder, CO 80301