UPDATE with a subquery

R

Robin Roberts

I have a Control table with two columns: File and Job. Job is the KEY and
File has the value I want to update another table with.

I want this query to work:
UPDATE tbl_MA_Ext SET File = (SELECT File
FROM tbl_Control
WHERE Job = "9A");

The error I receive is:
"Operation must use an updateable query."

It is guarenteed that only one value will be returned by the SELECT.
 
S

Steve Schapel

Robin,

One way would be...
UPDATE tbl_MA_Ext SET File = DLookup("[File]","tbl_Control","[Job]='9A'")
 
Top