S
Smartin
Firstly, please excuse the multipost. I have been unable to get
solutions in comp.databases.ms-access.
Can anyone help me get this update query right?
The SELECT subquery does select the rows I want to update when taken on
its own.
However when I add the UPDATE piece it finds no rows to update. What am
I missing here...
===== begin SQL
UPDATE Claims SET Payment = 'Not Required'
WHERE Payment IN
(
SELECT Payment From Claims Left Join People
ON People.ID = Claims.PeopleID
WHERE People.Foo = People.Bar
AND Canceled = False
AND IsNull (Payment)
);
===== end SQL
I have been offered using aliases and adding parens in the subquery
WHERE constraints, but neither affects the result.
Thanks for all help!
solutions in comp.databases.ms-access.
Can anyone help me get this update query right?
The SELECT subquery does select the rows I want to update when taken on
its own.
However when I add the UPDATE piece it finds no rows to update. What am
I missing here...
===== begin SQL
UPDATE Claims SET Payment = 'Not Required'
WHERE Payment IN
(
SELECT Payment From Claims Left Join People
ON People.ID = Claims.PeopleID
WHERE People.Foo = People.Bar
AND Canceled = False
AND IsNull (Payment)
);
===== end SQL
I have been offered using aliases and adding parens in the subquery
WHERE constraints, but neither affects the result.
Thanks for all help!