![]() |
Is there a way to identify similar but not exact match values in a database for example 243 w main st and 243 west main street thanks? |
[Edit] |
Answer
If you knew that the address (taking your example) contained the words "243" and "main" you could use wild card search in RDBMS
select * from <tablename_containing_Address> where <ColumnName_Containing_address> like "%243%main%"
This will list all records where the address contains 243 and main. It will not find an address that has both the words but main occurs before 243. To cater to that case also you may want to write the query as
select * from <tablename_containing_Address> where <ColumnName_Containing_address> like "%243%" and <ColumnName_Containing_address> like "%main%"
This query may be costlier (would take longer to execute and consume more computer resources) than the previous one because it uses two conditions instead of one in the first example.
First answer by Vbala 99. Last edit by Vbala 99. Contributor trust: 536 [recommend contributor]. Question popularity: 43 [recommend question]




