WHERE statement question -
05-21-2006
, 10:02 PM
I've inherited a db that has a table of salespeople with a field called
Territory. Territory contains a list of states that each salesperson
covers.
What I need to do is return a salespersons ID depending on if a state is in
his/her territory, something like...
SELECT SalesID
FROM Salesmen
WHERE Territory CONTAINS 'TX' (or any other state)
Territory in the db is just a list like 'TX, CA, LA'
I know there must be an easy way of doing this, but.... any suggestions.
Eventually, I'll redesign the db and split out territory as a separate
table, but can't do that now.
Thanks,
--
Doug |