*** Edit ***
I have two queries that I want to combine into one (I want to have one Query only - to delete the first one)
The first one will select all PPL with Cellular phones
The second one will use the first one to select all PPL with no Cellular phone
What I need is a list of PPL that have no Cellular phone.
The phones list of PPL are in PPL_Phones table
Also in the PPL table I have the main phone of each person (PPL.Phone)
Thanks
I have two queries that I want to combine into one (I want to have one Query only - to delete the first one)
The first one will select all PPL with Cellular phones
Code:
SELECT PPL_Phones.PPLID
FROM PPL_Phones INNER JOIN PPL ON PPL_Phones.PPLID = PPL.PPLID
WHERE PPL_Phones.SugTelephoneID=2 ' --- SugTelephoneID=2 ---> Cellular
The second one will use the first one to select all PPL with no Cellular phone
Code:
SELECT PPL.PPLID, PPL.Phone
FROM PPL LEFT JOIN PPLWithCellularPhones ON PPL.PPLID = PPLWithCellularPhones.PPLID
WHERE PPLWithCellularPhones.PPLID Is Null
What I need is a list of PPL that have no Cellular phone.
The phones list of PPL are in PPL_Phones table
Also in the PPL table I have the main phone of each person (PPL.Phone)
Thanks
Last edited: