I have come up with the following Script (It does not work)
INSERT INTO Table_1 ( item1, item2, item3, item4, condition_a, item5, item6 )
SELECT Table_2.item1, Table_2.item2, Table_2.item3, Table_2.item4, Table_2.condition_b, Table_2.item5, Table_2.item6
FROM Table_2;
Where table_1.item1 = Table_2.item 1
AND
condition_b < Condition_a
the conditions are numerical.
If condition_b < condition_a then I want that record in Table_1 update with the new condition.
Also if item1 in table 2 does not exist in table 1, then a new entry should be added.
INSERT INTO Table_1 ( item1, item2, item3, item4, condition_a, item5, item6 )
SELECT Table_2.item1, Table_2.item2, Table_2.item3, Table_2.item4, Table_2.condition_b, Table_2.item5, Table_2.item6
FROM Table_2;
Where table_1.item1 = Table_2.item 1
AND
condition_b < Condition_a
the conditions are numerical.
If condition_b < condition_a then I want that record in Table_1 update with the new condition.
Also if item1 in table 2 does not exist in table 1, then a new entry should be added.