title: Populating a temp table with two different values
body: <p>I was wondering how i can extend my current stored procedure to populate a temporary table.</p>
  
  <p>My current temporary table inserts a row when it finds a record from a table with the status of 'Processed'. I want to now populate all records that are 'Processed' but also all records of that similar 'ID' that are 'Processing'. So if Processed does not exist, take 'Processing if its there'</p>
  
  <p>I currently just build my temp table and i guess i need a conditional case here,</p>
  
  <pre><code>INSERT INTO @TBL1
  SELECT status_fkey, NULL, status_date_modified
  FROM tbl_records
  WHERE status_token = 'Processed'
  </code></pre>
  
  <p>In this table i also have status name which is the same across all status etc.. not sure if that will help my conditional case?</p>