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 |
|
csmith_xibe
Starting Member
1 Post |
Posted - 2009-09-24 : 11:51:45
|
| I have a table called suppliers:ID: Name---------------------001 - Johnston Services inc West Bank002 - Johnston Services Inc East Brook003 - Johnston Services co Georgetown004 - Mikes Towing005 - St. Paul heating Blairsville006 - St. Paul Heating Connelsville007 - St. Paul Heating008 - Some SupplierI want to group Name to Name by their likeness to each other and output results are to be like this:# Name------------------------------3 Johnston services1 Mikes towing3 St. Paul heating1 Some SupplierI didn't write the database and can not modify it, I also am toying with using Left(name,5) and grouping but that is not workng as expected - they need to be compared to each other with like...Anyone have an idea? |
|
|
Kabila
Starting Member
33 Posts |
Posted - 2009-09-25 : 01:59:39
|
| You can use the Soundex Function.Select ID, Name,Soundex(Name) from tablename |
 |
|
|
waterduck
Aged Yak Warrior
982 Posts |
Posted - 2009-09-25 : 05:04:15
|
wow i first time saw soundex function...not bad Hope can help...but advise to wait pros with confirmation... |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-09-25 : 05:28:44
|
quote: Originally posted by waterduck wow i first time saw soundex function...not bad Hope can help...but advise to wait pros with confirmation...
select soundex('waterduck'),soundex('waterducks'),soundex('waterduckss')MadhivananFailing to plan is Planning to fail |
 |
|
|
winterh
Posting Yak Master
127 Posts |
Posted - 2009-09-25 : 06:48:16
|
| Woah Soundex. I am going to look that up now.[ /fail at query] |
 |
|
|
|
|
|