How would I structure a Select statement where I am looking for a specific value. Here's the catch:
The value I'm looking for may be the first term, middle term, or last term in a string.
The problem I see is that if I do:
...WHERE `location` LIKE 'Canada' (only if alone ?)
...WHERE `location` LIKE 'Canada%' (only if at start)
...WHERE `location` LIKE '%Canada%' (only if in middle)
...WHERE `location` LIKE '%Canada' (only if on end)
I want a *simple* WHERE statement that is unconditional...if the word 'Canada' is anywhere in the `location` field, return it.
Is this possible?
TIA
The value I'm looking for may be the first term, middle term, or last term in a string.
The problem I see is that if I do:
...WHERE `location` LIKE 'Canada' (only if alone ?)
...WHERE `location` LIKE 'Canada%' (only if at start)
...WHERE `location` LIKE '%Canada%' (only if in middle)
...WHERE `location` LIKE '%Canada' (only if on end)
I want a *simple* WHERE statement that is unconditional...if the word 'Canada' is anywhere in the `location` field, return it.
Is this possible?
TIA