Search Query
-
Hi, I have a Address field.I want to make a query that returns all records that their addresses contain all words of a address in any order. Suppose 'John street , No 2' is the address, I want to return all addresses that contains 'John' , 'street', 'No' and '2' in any order. How can I make this query? Original string : My name is Mehrdad
Best wishes
-
Hi, I have a Address field.I want to make a query that returns all records that their addresses contain all words of a address in any order. Suppose 'John street , No 2' is the address, I want to return all addresses that contains 'John' , 'street', 'No' and '2' in any order. How can I make this query? Original string : My name is Mehrdad
Best wishes
Use and with like
SELECT *
FROM Somehwere
WHERE address1 LIKE '%John%'
AND address1 LIKE '%Street%'
AND address1 LIKE '%No%'However this is not going to help where you have
St
instead ofStreet
,Rd
instead ofRoad
and many many more issues that arise from cleaning address data.Never underestimate the power of human stupidity RAH
-
Hi, I have a Address field.I want to make a query that returns all records that their addresses contain all words of a address in any order. Suppose 'John street , No 2' is the address, I want to return all addresses that contains 'John' , 'street', 'No' and '2' in any order. How can I make this query? Original string : My name is Mehrdad
Best wishes