title: How to return true if two same columns in two different tables have values? SQL
body: <p><a href="https://i.stack.imgur.com/32A2r.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/32A2r.png" alt="Table_A"></a><a href="https://i.stack.imgur.com/AuwPT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AuwPT.png" alt="Table_B"></a></p>
  
  <p>Back on here with another question for y'all!</p>
  
  <p>So we have two Pivot tables, Table_A and Table_B. Both tables have the same columns. </p>
  
  <p>I was trying to write a query that'll go through each row and return true ONLY AND ONLY IF the record with the same ID has a value in the 'Value' field. 
  So for example, Table_A has 'sdnbfsj' value for record ID3 and Table_B has a value under the 'Value' field for the same record ID. </p>
  
  <p>The query should be able to validate that the same cell in both tables have values and if they do, then return true. If the tables only had three records in total, this would have returned true but notice that record ID 5 has a value in Table_A but record ID 5 is NULL in Table_B. SO the query should return false. </p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>SELECT source_column from 
  (
  select source_column from Table_A WHERE Value_Inserted=1
  EXCEPT
  select source_column from Table_B WHERE Value_Inserted=1
  )X
  WHERE source_column  IN 
  (
  'Col_1'
  ,'COl_2'
  ,'Col_3'
  ,'Col_4'
  )
  </code></pre>