Click to See Complete Forum and Search --> : Searching a Database in ASP


b_cochofel
May 7th, 2003, 08:17 AM
Ok, I want to search a database for a keyword but I want people to be able to make mistakes with (i.e. 'têm' could be 'tem'), sorry for all english users, but I'm a portuguese and our language has this grammar issues...

I would like to replace 'ê' and 'e' for '%' to search in a SQL query, but I want to know if is another way besides using Replace() 2 times, first for 'ê' to '%' and then 'e' to '%'???

Sorry if this is not the place for this post, but I think some of the users in here know ASP and VBScript...

antares686
May 12th, 2003, 04:44 AM
Not knowing what type of SQL based server you are using I am commenting from MS SQL Server standpoint.

You could use Soundex instead of like or check out Planet Source Code (http://www.planet-source-code.com) and do a search in the SQL Section for "DoubleMetaPhone" which someone has posted and does a much bettter job than SoundEx.