There are three tables
Email
ID
10
11
12
SLA_DATE
ID | Email_ID
21 | 10
22 | 11
23 | 12
SLA
ID | Email_ID
33 | 10
34 | 11
35 | 12
I am trying to update the SLA Email_ID from Email.ID to SLA_DATE.ID. So, after updating the SLA, the table should look like
SLA
ID | Email_ID
33 | 21
34 | 22
35 | 23
Below is what i have tried so far..
UPDATE SLA SET
SLA.Email_ID = SLA_DATE.ID WHERE SLA_DATE.Email_ID = SLA_EMAIL_ID