Thread: easy question... i think
06-01-06, 19:44 #1Registered User
- Join Date
- Mar 2005
Unanswered: easy question... i think
I have a ASP page where the user posts part of the name field. Then i need to provides the matches. (providing partial comparision of the field & correcting bad spelling)
User posts 'softwair' (should be software)
the query look like this
Select Name from A where Name is like '%softwair%' <-- but appling soundex on it in the like field, or something like it.
I could make a copy of the column and update all info in the field to the soundex value, but then the like statement would not get it if the value was only part of it. for example say the data values where like 'Microsoft Software', or 'My Software Solutions', ect...
06-02-06, 19:29 #2Registered User
- Join Date
- Jul 2003
- San Antonio, TX
You don't need to "update" the column to the soundex result, just create a computed column that would use soundex(field_name) as a function. But this will only answer the misspelling question.
select soundex('software'), soundex('softwair')
results in 'S136' for both."The data in a record depends on the Key to the record, the Whole Key, and
nothing but the Key, so help me Codd."