escaping the # character in query

roypython

Registered User.
Local time
Tomorrow, 02:32
Joined
May 16, 2005
Messages
29
Hello.
I'm using a filter that contain # as one of the characters that the field might contain.
I get some very inetersting results.

using
Code:
             "select fld1
              from tbl1
              where fld1 not like 'D#%'
             "

Lets' say that the values for fld1(text type) are :
Dodo
D# cc
The query above will return the 2 records, it is "egnoring" the filter.


How can I solve this problem?

Thanks a lot
Roy
 
Try putting # in square brackets:

SELECT fld1
FROM tbl1
WHERE fld1 Not Like 'D[#]*';
.
 

Users who are viewing this thread

Back
Top Bottom