D
Daedalus
I have the SQL listed below, why doesn't it work? I get
error 'Operation must use an updateable query'. All I am
trying to do is update the ApprovedDate field in the
UniquePrograms table with the earliest ApprovedDate
listed in its corresponding entries in the ProgramHistory
table. ProgramHistory table can have multiple entries for
each program due to the fact that a program can be
approved, cancelled and reenacted multiple times. Am I
totally off on how to accomplish this? :s
UPDATE UniquePrograms AS UP
SET UP.ApprovedDate = (
SELECT Min(U.ABORApprovedDate)
FROM ProgramHistory AS PH
WHERE PH.ProgramAbr = UP.ProgramAbr AND PH.ProgramName
= UP.ProgramName
);
error 'Operation must use an updateable query'. All I am
trying to do is update the ApprovedDate field in the
UniquePrograms table with the earliest ApprovedDate
listed in its corresponding entries in the ProgramHistory
table. ProgramHistory table can have multiple entries for
each program due to the fact that a program can be
approved, cancelled and reenacted multiple times. Am I
totally off on how to accomplish this? :s
UPDATE UniquePrograms AS UP
SET UP.ApprovedDate = (
SELECT Min(U.ABORApprovedDate)
FROM ProgramHistory AS PH
WHERE PH.ProgramAbr = UP.ProgramAbr AND PH.ProgramName
= UP.ProgramName
);