I have two tables. I want to create a trigger on this two tables. Columns in tables are like below.
Table_A
CL_ID, TIMESTAMP_A, OUT_ID, STATUS ETC.
Table_B
OUT_ID, TIMESTAMP_B, ETC.
Data insert automatically inside this two tables (Because of entegrated systems). I need to control like this.
IF TIMESTAMP_A > TIMESTAMP_B THEN
UPDATE TABLE_A SET OUT_ID =' ' AND STATUS = 'ABC'
WHERE A.OUT_ID = B.OUT_ID
I have not too experience about trigger. I tried to create a views from this two tables using "join" and wrote a "instead of trigger" but it doesn't work correctly. Does stored procedure make more sense for this? Can someone help me this issue? Thanks in advance for helping me.