Jump to content

Update table one if record in table two exists


george

Recommended Posts

I have a table called staff, and I want to change the column JCN_RC to a static value. 'MY53', if the table AVTeam has a record corresponding record. By corresponding record, I mean that there exists a record in AVTeam. If it exists, the emplid value in the Staff table is equil to the emplid in the second table, AVTeam. I tried this,

UPDATE Staff s, AVTeam p SET s.JCN_RC = 'MY55' WHERE s.EMPLID = p.EMPLID

Suggestions?Thanks

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...