All we need is an easy explanation of the problem, so here it is.
I have two tables:
ID TICKET_AGENT ORIGINAL_ID 1 0 5 2 0 3 3 0 1 4 0 2
ID TICKET_AGENT 1 A 2 C 3 B 4 B
Is there any scenario where I can use
UPDATE to update
Table 1.TICKET_AGENT field by searching through
ORIGINAL_ID as the
Table 2 and if
ORIGINAL_ID is found in
table 2, update
table 1 after with the corresponding
UPDATE: ORIGINAL_ID points to ID in table 2
How to solve :
I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.
You can just do a joined
update table1 inner join table2 on table2.ID = table1.ORIGINAL_ID set table1.TICKET_AGENT = table2.TICKET_AGENT
Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂