Hi,
I need to run a query on data stored in an Access 97 *.mdb that searches for data using LIKE where the data stored in a database could contain spaces and the data being used for the search does not:
For example - searching on '%alovelyday%'
would retrieve not only "alovelyday", but also "a lovely day"
To do this I assumed I'd be able to use:
Code:
SELECT + FROM Table WHERE REPLACE(Column_Name, ' ', '') LIKE '%alovelyday%'
But my JET 4.0 driver returns the following error:
"undefined function 'replace()' in expression".
So it looks like I can't use this function and will have to do it another way.
So my question is.... can anyone think of another way of doing this? Can it be done with patternmatching? Is there a way of searching a string and telling the query to ignore whitespace?
Please help - this has been driving me insane! It should be so simple....!