subquery a city
Hi all,
I've to link a person's address to the city table to know the state but
unfortunately the same ZIP may be in 2 different states (don't ask me
why....)
So I may have this in ZIP table:
ZIP CITYNAME STATE
1410 Thierrens VD
1410 Correvon VD
1410 Prevendavaux FR
So linking the city like this:
select STATE from person
left join city on person.ZIP = city.ZIP returns 2 rows.
I've tried to add a fulltext index in the city table and doing that
select STATE from person
left join city on (person.ZIP = city.ZIP and MATCH(city.city)
AGAINST(person.cityname))
isn't allowed as AGAINST need a string and can't work with a field name.
How can I fix this ?
Thanks for answering.
Bob
|