Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
novicenovice
Starting Member
4 Posts |
Posted - 2008-06-20 : 06:35:49
|
| SELECT * from table where city like '%woshington%'Now this would return nothing, as there is no city like woshington. but google find results and ask as r u looking washington. so would u please tell how I may write an intelligent SQL like query |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-06-20 : 06:41:19
|
| You can make use of SOUNDEX() or Difference() functionHarsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
novicenovice
Starting Member
4 Posts |
Posted - 2008-06-20 : 06:44:22
|
| I am very new to SQL just like new born baby:). Even not familar with syntax as well. Would you please write complete query. Thanks |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-06-20 : 06:44:36
|
| [code]declare @t table( state varchar(100))insert @tselect 'new york' union allselect 'washington' union allselect 'new jersey'-- using soundexselect * from @t where soundex(state) = soundex('woshington')-- using differenceselect * from @t where difference(state, 'woshington') = 4[/code]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
novicenovice
Starting Member
4 Posts |
Posted - 2008-06-20 : 06:57:25
|
| thanks. It works ... But it is too sensitive with sound... I mean in the category column the values was Cloths. I searched with cloth, it provide no results then i searched with clootss. It gives results.any how. thanks for your prompt help.Ahmad. Pakistan |
 |
|
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
|
|
|
|
|