Hi Guys,
I want to use the % wildcard on a query to match some phrases from one table to a column on another table . But I am having doubts whether I am actually doing the right thing here.
This my query:
SELECT name, phonenumber, address, streetname FROM `wb_stores`, `wb_store-street` WHERE wb_store-street.streetname LIKE wb_stores.%address%
There are two tables:
wb_stores
wb_store-streetCode:+--------+-------------+--------+--------------------+ | ID | shopname | tel | address | +--------+-------------+--------+--------------------+ | 10000 | Tesco | 205587 | main street 55a | | 10001 | Halfords | 208790 | north Boulevard 4 | | 10002 | T-Mobile | 204221 | north Boulevard 8 | | 10003 | H & M | 215889 | main street 43c | | 10004 | McDonald's | 205952 | main street 43b | | 10005 | Jack & Jones| 207285 | kingfisher road 2 | | 10006 | Diesel | 202085 | Hayne road 22f | +--------+-------------+--------+--------------------+
I need to match the street name (from table: wb_store-street)with the street name part in de address (from table: wb_stores). Any clue's ?Code:+--------------------+ | streetname | +--------------------+ | main street | | kingfisher road | | north Boulevard | | Hayne road | | main street | | Conway street | | Borough road | | Price street | | Holland road | | Hamilton square | +--------------------+


Reply With Quote


Bookmarks