Searching for the asterisk character

TimE

Registered User.
Local time
Today, 11:46
Joined
May 17, 2005
Messages
55
Querying for the asterisk character

Someone used the asterisk (actually, 2 of them **) character in a field to 'mark' it for querying. Since it is a wildcard, how do I query the field to show only the records with "**" in it? What is the best way to remove them using an update query???

Thanks in advance for ANY help.
 
Last edited:
You might try something along the lines of:
Code:
SELECT [b]MyTable[/b].*
FROM [b]MyTable[/b]
WHERE InStr(1,[b]MyTable.MyField[/b],'*')>0;
...where MyTable can be substituted with the name of the table you are trying to evaluate and MyField can be substituted with the name of the field to which you are applying the criteria.

To remove the *'s from a given field, you can execute an update query along these lines:
Code:
UPDATE [b]MyTable[/b]
SET [b]MyTable.MyField[/b]=Replace([b]MyTable.MyField[/b],'*','');
 

Users who are viewing this thread

Back
Top Bottom