Hi guys,
Trying to bulk update a date column in a table (attribute) with a a date value from a seperate table (member).
syntax at the moment looks like....
however getting error that subquery returns more than one value.... any ideas how to do this?
Cheers all.
Dan.
Trying to bulk update a date column in a table (attribute) with a a date value from a seperate table (member).
syntax at the moment looks like....
Code:
--join
update attribute a
join member m on m.individual_ref = a.individual_ref
set a.valid_to = m.leave_date
where a.individual_ref in
(select individual_ref from member
where leave_date is not null and individual_ref is not null)
this join is throwing errors (assuming you cannot uise joins in update statements?)
-- or straight subquery
update attribute
set valid_to = (select leave_date from member)
where a.individual_ref in
(select individual_ref from member
where leave_date is not null and individual_ref is not null)
however getting error that subquery returns more than one value.... any ideas how to do this?
Cheers all.
Dan.