I'm running a query from a Delphi app on data stored in an Access 97 *.mdb using ADOQuery that searches for data using LIKE . The problem is, I need to be able to search for words without typing in the spaces.
For example - searching on '%alovelyday%'
would retrieve not only "alovelyday", but also "a lovely day", or even "alove lyday"
To do this I assumed I'd be able to use:
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 ....!