Hi,
I would appreciate it if someone could shed some light on this problem.
Say I have a table full of TicketNums and I want to find the one shown below.
Ticketnum | Prob_ID | Emp_ID1 | Emp_ID2 |
------------------------------------------------------
105 | 634 | 89 | 677 |
Now, lets say I have 4 Emp_ID's to work with.
EmpID = 89,677,768,898
The EmpID values can exist in either Emp_ID1 or Emp_ID2.
Now I want to setup a query that will go through each EmpID and will get me the result below.
I've figured out how to work this out if I have only two EmpID to start with
query" SELECT * FROM Tickets WHERE Ticketnum=105 &&
( (Emp_ID1='89' || Emp_ID1='677') && (Emp_ID2='89' || Emp_ID2='677') )
This gives me the result below, but if I have more than two EmpID to start with then I'm lost.
Ticketnum | Prob_ID | Emp_ID1 | Emp_ID2 |
------------------------------------------------------
105 | 634 | 89 | 677 |
Any help will be greatly appreciated.
Thanks