ok we have 3 tables campaign...campaignteam, and staff
we want to show the staff details by what campaign they are in
insert into CTeam
values ('001','20','10','11','12','13');
here is how we enter staff members into campaigns
001=CTeamId
20=CampaignId
10,11,12,13=StaffIds
the fields for the campaign team are CManager,Contact1,Contact2 and PurchasingAst
we tried this query
SELECT stForname,stSurname,stTelNumber
FROM Staff
WHERE StaffId = (SELECT CManager,
FROM CTeam WHERE CTeam.CTeamId='001')
AND StaffId = (SELECT Contact1,
FROM CTeam WHERE CTeam.CTeamId='001')
AND StaffId = (SELECT Contact2,
FROM CTeam WHERE CTeam.CTeamId='001')
AND StaffId = (SELECT PurchasingAst,
FROM CTeam WHERE CTeam.CTeamId='001');
it dont work, its wrong and we dont know how to fix it.for this example we have just used the CTEAM id of 001 to try and load the staff members in that team. any help?
we want to show the staff details by what campaign they are in
insert into CTeam
values ('001','20','10','11','12','13');
here is how we enter staff members into campaigns
001=CTeamId
20=CampaignId
10,11,12,13=StaffIds
the fields for the campaign team are CManager,Contact1,Contact2 and PurchasingAst
we tried this query
SELECT stForname,stSurname,stTelNumber
FROM Staff
WHERE StaffId = (SELECT CManager,
FROM CTeam WHERE CTeam.CTeamId='001')
AND StaffId = (SELECT Contact1,
FROM CTeam WHERE CTeam.CTeamId='001')
AND StaffId = (SELECT Contact2,
FROM CTeam WHERE CTeam.CTeamId='001')
AND StaffId = (SELECT PurchasingAst,
FROM CTeam WHERE CTeam.CTeamId='001');
it dont work, its wrong and we dont know how to fix it.for this example we have just used the CTEAM id of 001 to try and load the staff members in that team. any help?