I have written a database for my office which contains alot of contact information, including phone numbers. I tell my boss all the time, just use the last 4 digits of the phone number to search, but it goes in one ear and out the other and she constantly searches for:
8478645
When the database has the number in it as:
847-8645
So she gets NO results, of course. I understand why, she doesn't. Now, my question is, what's the absolute best way to make the database ignore the - dashes when the sql statement is thrown at the db?
I thought about deleting all the dashes from the db and then just showing it as formatted with a dash when it's called. Like, if len(txtPhone.text) = 7 then add the dash after the first 3, or whatever. I can do that. But I kinda just wanted it to ignore them if possible. I dunno, I don't want to tell her she has to type 847*8645 from now on. I want 847-8645 AND 8478645 to yield the same results.
Help!
8478645
When the database has the number in it as:
847-8645
So she gets NO results, of course. I understand why, she doesn't. Now, my question is, what's the absolute best way to make the database ignore the - dashes when the sql statement is thrown at the db?
I thought about deleting all the dashes from the db and then just showing it as formatted with a dash when it's called. Like, if len(txtPhone.text) = 7 then add the dash after the first 3, or whatever. I can do that. But I kinda just wanted it to ignore them if possible. I dunno, I don't want to tell her she has to type 847*8645 from now on. I want 847-8645 AND 8478645 to yield the same results.
Help!