I need a SQL statement that will select a value from a table and perform an update on that same table if the criteria is met. This is what I have but its not working:
can anyone help?
- VB Rookie
Code:
update open_enrollment
set ee_cost_year = (select ee_cost_year from open_enrollment where ssn = open_enrollment.ssn and benefit_id = "LIFE' and plan_id = 'OPTIONAL' and option_id = '1XSAL')
where benefit_id = "LIFE' and plan_id = 'OPTIONAL' and option_id = '1XSAL'
- VB Rookie