Advanced Select Query [Reexplained]

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

Sorry for the re-post, my original post wasn't very clear. this is
very important. I need a query that can return wildcard matches if
there's no exact match. I'm using IIS 5 with ASP.NET and MS Access.
Bascially what I'm trying to do is to partially match a field. It's
like when you type a mis-spelled word in google it gives you
suggestions to the next possible match.

this is what my db table looks like
ID DESCRIPTION
---- ---------------
1 My * address *
2 My * number *
...
here's my pseudo-query
SELECT DESCRIPTION FROM table1 WHERE ...

if the input is "my email address is (e-mail address removed)"
it would select ID 1

I hope this makes sense
Thanks for helping me
Aaron
 
SELECT DESCRIPTION FROM table1 WHERE LIKE DESCRIPTION '%my email address is
(e-mail address removed)%'

will not work if the text betwwen the % .. % is not inside DESCRIPTION.

SELECT DESCRIPTION FROM table1 WHERE LIKE DESCRIPTION '%[email protected]%'

should work if DESCRIPTION = 'My E-Mail is (e-mail address removed)'

this means you would have to break down your search string into words and do
a multible SELECT and check the results.

Hope this helps

Mark Johnson, Berlin Germany
(e-mail address removed)
 
Back
Top