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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 search matched rows of 2 tables

Author  Topic 

zam1030
Starting Member

6 Posts

Posted - 2007-09-14 : 06:11:59
Hi,

I have 2 tables:
1. Hospital - containing Address, Region
2. Doctor - containing Doctor Name, Address, Region

I'd like to update the Doctor.Region column by matching Hospital.Address and Doctor.Address, the addresses' values may not be exactly the same.
Example:
Address (Doctor) Hospital
3F Green Bldg. St. Joseph Hospital => St. Joseph Hospital
Saint Joseph Hosp. Red Bldg. => St. Joseph Hospital


Will appreciate your help very much.

Thanks.

Kristen
Test

22859 Posts

Posted - 2007-09-14 : 06:50:44
There are some algorithms here that may help you do some "fuzzy" matching:

See: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=A+better+Soundex

Kristen
Go to Top of Page

zam1030
Starting Member

6 Posts

Posted - 2007-09-14 : 07:00:29
Thanks, Kirsten!
I'll look into this and will try it out.

Go to Top of Page
   

- Advertisement -