P
Paul James
I'm trying to create an update query that will set the value of a Yes/No
field to -1 when two fields in all the corresponding records in a related
(many) table are not null.
The field to update is named "Processed," and is in a table named
tblInvoice.
The related (many) table is tblDetail, and the fields which must not be null
are named "PCA" and "Source."
The statement I've tried to use is:
UPDATE tblInvoice SET Processed = -1 WHERE Is Not Null ALL (SELECT D1.PCA,
D1.Source FROM tblDetail AS D1 WHERE D1.Invoice_ID = I1.Invoice)
However, I'm getting a syntax error when I try to run it. The message
identifies the error as beginning with
"Is Not Null All (SELECT . . .
and continuing to the end of the statement.
Can anyone tell me how to modify this statement to get it to work?
Thanks in advance,
Paul
field to -1 when two fields in all the corresponding records in a related
(many) table are not null.
The field to update is named "Processed," and is in a table named
tblInvoice.
The related (many) table is tblDetail, and the fields which must not be null
are named "PCA" and "Source."
The statement I've tried to use is:
UPDATE tblInvoice SET Processed = -1 WHERE Is Not Null ALL (SELECT D1.PCA,
D1.Source FROM tblDetail AS D1 WHERE D1.Invoice_ID = I1.Invoice)
However, I'm getting a syntax error when I try to run it. The message
identifies the error as beginning with
"Is Not Null All (SELECT . . .
and continuing to the end of the statement.
Can anyone tell me how to modify this statement to get it to work?
Thanks in advance,
Paul