J
Jose.M.Huerta
I want to pre-compute the sum of some values and store it on a table.
The query is:
UPDATE tblMachacas AS t1 SET Participacion = (SELECT Sum([Valor]) FROM
tblDefsTurno INNER JOIN tblTurnos ON tblDefsTurno.IdDefTurno =
tblTurnos.IdDefTurno
WHERE tblTurnos.IdMachaca = t1.IdMachaca);
In the table tblMachacas I have a field called Participacion that is
the sum of valor in all related registers of tblDefsTurno. But I get
the next error in access:
"La operación debe usar una consulta actualizable" -> The operation
must use an updatable query.
tblMachacas is a linked table and I can update it using:
UPDATE tblMachacas SET Participacion = 0 WHERE IdMachaca = 1;
How can I do it?
The query is:
UPDATE tblMachacas AS t1 SET Participacion = (SELECT Sum([Valor]) FROM
tblDefsTurno INNER JOIN tblTurnos ON tblDefsTurno.IdDefTurno =
tblTurnos.IdDefTurno
WHERE tblTurnos.IdMachaca = t1.IdMachaca);
In the table tblMachacas I have a field called Participacion that is
the sum of valor in all related registers of tblDefsTurno. But I get
the next error in access:
"La operación debe usar una consulta actualizable" -> The operation
must use an updatable query.
tblMachacas is a linked table and I can update it using:
UPDATE tblMachacas SET Participacion = 0 WHERE IdMachaca = 1;
How can I do it?