Posted by Jack Vamvas on 07/03/06 09:03
Redesign your db, i.e instead of a table with the 5 supported states
columns , set up a lookup table , and then a table with 2. columns i.e
candidateId | SupportedStaeID |
--
----
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
___________________________________
"Alex" <iamalex84@gmail.com> wrote in message
news:1151703920.810636.228800@75g2000cwc.googlegroups.com...
> I am trying to create a system that will select candidates for a job
> based on certain criteria (i.e. Supperted States)
>
> The candidates are allowed to choose up to 5 supported states. The
> problem comes when creating the query to pull the candidates out.
>
> I can get it to work with only one supported state, no problem. But I
> have no idea how to tell the DB to look through SupportedState1 OR
> SupportedState2 OR SupportedState3 OR SupportedState4 OR
> SupportedState5 to find the particular state that the job is in.
>
> Does an OR operator exist; or at least some mechanism for achieving
> this? Maybe there is a smarter way to implement this instead of 5
> seperate fields for the supported states?
>
> Thanks so much,
> Alex
>
[Back to original message]
|