>>>I usual do a wild card search for a string of characters with a
>>>SELECT - SQL statement. I always put a space in front of the string to
>>>filter out unwanted results. If the word or string I'm looking for is
>>>preceded by carriage return it will not pick it up the record. How can I
>>>adjust my SELECT statement to account for the carriage return?
>>>
>>>This is how I look for it now: WHERE descriptiveField LIKE "% StringValue%"
>>>
>>>Thanks!
>>
>>You can filter unwanted leftmost character using:
>>Select .... Where Left(descriptiveField,1)<>chr(13)
>
>That would not do exaclty what I need. I don't want to filter out the carriage
>return, I want to make sure I pick the record up in the search.
>
>I tried this with no luck:
>
> WHERE (descriptiveField LIKE "% StingValue%";
> OR descriptiveField LIKE "%"+CHR(13)+"StingValue%")
If you want to select all matched records, regardless CHR(13), then '%' will care about it. For example, WHERE descriptiveField LIKE "%q%" will pick all records containing 'q' with or without CHR(13). I guess your code has problem with either space between % and StingValue or/and StingValue (I don't know what it should be, but note that it's supposed to be
literal word).
Edward Pikman
Independent Consultant