I am once again very confused and I return here for more help
If I run the following query I return 721 records.
select
users.`MobilePhone`
from users
left join MobilePhones on
users.`MobilePhone` = MobilePhones.`Telephone No`
WHERE MobilePhones.`Telephone No` IS NULL
and
users.`MobilePhone` <> ""
and
users.`TelephonyProfile` = "Mobile"
and
users.`MobilePhone` not like "44%"
I now want to flag these to be looked into further.
I therefore run the following
UPDATE users join MobilePhones on (users.`MobilePhone` = MobilePhones.`Telephone No`)
SET `CheckMobileNo` = 'YES'
WHERE MobilePhones.`Telephone No` IS NULL
and
users.`MobilePhone` <> ""
and
users.`TelephonyProfile` = "Mobile"
and
users.`MobilePhone` not like "44%"
This returns NO updates, the CheckMobileNo have not been updated and remain blank.
What am I doing wrong please?
Your join here:
should be a
LEFT JOIN