title: Best approach to insert delta records from view into a table
body: <p>I have a requirement where I do a daily load from a view to a table. After the initial load, there may be scenarios where the original records get deleted from the view's source table. There are also scenarios where these records are updated.</p>
  
  <p>When the stored procedure is run, the table that is loaded should pick up delta records. This means only new inserts. Also, it should mark deleted lines as D. In addition to this, any updates in source data must also updated in this table and marked as U.
  Please refer to the attached image which shows in case 1 , 2 inserts on the initial load and then an update and then a delete. 
  Left side represents the view and right side represents the table I am trying to load.
  <img src="https://i.stack.imgur.com/8iSzw.jpg" alt="Click for attached image">
  Thanks!</p>
  
  <p>Shyam</p>