i have 2 tables, , want update data in 1 table based on conditions in both tables being satisfied.
table 1 called employee , contains fields staffid,forename, surname , grade. table 2 called competence , contains fields compid, staffid, groupid, subgroupid, skilllevel , skillupdate. common field staffid.
the field skilllevel can value 0 5 , want reduce 3 when @ 'graduate' grade has set 4 or 5. how can that?
if i've understood question try , let me know. :p
update competence inner join employee b on a.staffid = b.staffid set a.skilllevel = 3 b.grade 'graduate' , a.skilllevel in (4,5)
Comments
Post a Comment