When performing the following update:
the section in bold is being ignored. Is there a logical reason why this might be happening? Have i written the update incorrectly?
UPDATE learner_ilr l
SET l.prior_attain_ level =
(SELECT p.prior_attain_ level
FROM people p
WHERE p.person_code = l.person_code
AND p.prior_attain_ level IS NOT NULL)
WHERE
l.prior_attain_ level IS NULL AND
l.funding_year = 13
SET l.prior_attain_ level =
(SELECT p.prior_attain_ level
FROM people p
WHERE p.person_code = l.person_code
AND p.prior_attain_ level IS NOT NULL)
WHERE
l.prior_attain_ level IS NULL AND
l.funding_year = 13
the section in bold is being ignored. Is there a logical reason why this might be happening? Have i written the update incorrectly?
Comment