By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,903 Members | 2,097 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,903 IT Pros & Developers. It's quick & easy.

Access Search Algorithm?

P: 256
Hey everyone,
I was wondering how I would go about creating some sort of search algorithm that would find partial matches to a string variable search? (ie. 50123 would be an 80% match with 05123 .. or something like that)...

What steps would one need to take to set something like that up? I'm sure I'm not the only one who's envisioned something like this. Being able to search through a database and use the data stored there is vitally important to anyone, so I'd imagine that this is something that has come up before.
Dec 18 '07 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 10K+
P: 12,366
You can use a soundex() variant or if you want to do what you laid out above, it's a simple loop through the string and compare it character by character. Then you return # matched divided by length of the string.
Dec 18 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.