Re: Update from array
The ScareCrow wrote:
> Something like the following should work
I do not think Access likes that join type with updates. At least not my
version. It does work if you place the join after the UPDATE:
UPDATE Productivity INNER JOIN Productivity R ON Productivity.WeekEndingDate =
DateAdd("d",-7,R.WeekEndingDate)
SET Productivity.Earned = R.Earned
, Productivity.PercentComplete = R.PercentComplete
WHERE Productivity.WeekEndingDate = Date()
Though using dateAdd(..) probably eliminates the possibility of using indexes.
But assuming it is a small table it probably would not make a noticeable
difference.
|