I am trying to do an INSERT INTO Trades1 SELECT TradeID,Version,Status from another table called Trades_2 and check if the TradeID alreads exists in Trades1 table and if it exists,update the Status to 'INACTIVE' and if it does not exist, update the status to 'ACTIVE'

Check this illustration... But already matched TradeIds are available in Trades1 table.. So you have to do MERGE operation ( MERGE is for doing INSERT and UPDATE operations at a time)--This is solution for your scenarioMERGE INTO Trades1 TarUSING Trades2 Sou ON (sou.TradeId = tar.TradeId)WHEN MATCHED THEN UPDATE SET [status] = 'INACTIVE'WHEN NOT MATCHED THEN INSERT (TradeID,Version, status)VALUES( sou.TradeID, sou.Version, 'ACTIVE');