jayteebee3
New member
- Local time
- Today, 18:16
- Joined
- Jul 23, 2013
- Messages
- 4
Hi all, hoping you can help me with the following. (I've just inherited a databse from a predecessor that I need to make a few ammendments too)
I have a table (tDist) that users are updating manually based off an excel file. I've written a query (qImp) to take the relevant data from the file, which works fine. The problem is when I try to UPDATE tDist based off this query.
Structure of the Table and Query:
tDIST
Acc TEXT(10),
Cl TEXT(2),
XD DATE/TIME,
PD DATE/TIME,
Ccy TEXT(3),
Div DOUBLE,
Created On DATE/TIME,
Created By TEXT(100)
qImp
Acc,
Cl,
XD,
PD,
Div
So basically if Acc and Cl are in qImp then update the details XD, PD and Div from tDist. I've got the following but I get an "Operation must use an updateable query" message.
Any help would be greatly appreciated as I would usually use an UPDATE FROM...but access doesn't seem to like that
I have a table (tDist) that users are updating manually based off an excel file. I've written a query (qImp) to take the relevant data from the file, which works fine. The problem is when I try to UPDATE tDist based off this query.
Structure of the Table and Query:
tDIST
Acc TEXT(10),
Cl TEXT(2),
XD DATE/TIME,
PD DATE/TIME,
Ccy TEXT(3),
Div DOUBLE,
Created On DATE/TIME,
Created By TEXT(100)
qImp
Acc,
Cl,
XD,
PD,
Div
So basically if Acc and Cl are in qImp then update the details XD, PD and Div from tDist. I've got the following but I get an "Operation must use an updateable query" message.
Code:
UPDATE tDist AS A
INNER JOIN qImp AS Q
ON (cdbl(A.SC)=Q.SC) AND (cdbl(A.Acc)=Q.Acc)
SET A.XD = Q.XD, A.PD = Q.PD, A.Div = Q.Div;
Any help would be greatly appreciated as I would usually use an UPDATE FROM...but access doesn't seem to like that
