Marshall Barton said:
prototype wrote:
Can the "not like" operator be used to compare two fields that are memo type?
I ran a query to compare (using "not like") two fields of memo type. The
query returned fields that appeared to be identical. Can the "not like"
operator be used to compare memo type fields?
I just tested this on some fields where the only difference
started in character position 400 and it worked fine with
Like, Not Like and =
Note that using Like (or Not Like) without wildcards doesn't
make any sense, just use = or <>
OTOH, maybe your problem is that the field contains some
wildcard characters, in which case you are not really
comparing the two fields (a good reason why Like is
inappropriate unless you plan on the wildcards doing
something meaningful).
I greatly appreciate your help Marshall. I am a bit of a novice and thanks
to your help I have a better understanding of when to use “not like” and when
to use the trusted <> operator. In my case I was not using wildcards and just
wanted to compare two memo fields (i.e. [memoField1].[txt] not like
[memoField2].[txt]). I will now use "[memoField1].[txt] <>
[memoField2].[txt]" instead.
I would like to clarify one thing though. I performed the same test you did
but instead of having memo fields that were different I used memo fields that
were identical. Unfortunately in this case the “not like” operator returned a
false positive. The query indicated that the fields were not the same even
though they were. This is probably a moot point but I just wanted to clarify.