russeldraper
Technical User
I'm trying to run an update statement on my database. It going to change information in one of my tables, but I need to link that table with two other tables to figure out which records need to be updated. I know that that statement should look something like this:
update s
set s.status = s.status*2
from s1 left outer join sp on s.sno = sp.sno
where sp.qty > 250;
This statement links two tables, but I need to figure out how to link this statement with a table p where p.color = 'red'. The link with for this table would be sp.pno = p.pno.
Thanks for any help.
update s
set s.status = s.status*2
from s1 left outer join sp on s.sno = sp.sno
where sp.qty > 250;
This statement links two tables, but I need to figure out how to link this statement with a table p where p.color = 'red'. The link with for this table would be sp.pno = p.pno.
Thanks for any help.