title: Create SQL View based on whether column values exist in another view
body: <p>I currently have a SQL table and view, "JobTable" and "JobView" respectively.</p>
  
  <p>I also have a second SQL table "JobOpTable"</p>
  
  <p>The view "JobView" contains two key columns, "JobNumber" and "Status". This is a filtered view from the main JobTable that only shows Job Numbers where the status is "Ready for Operation".</p>
  
  <p>The "JobOpTable" contains several operations against a single job number. For example,</p>
  
  <p>JobTable:</p>
  
  <pre><code>JobNumber / Status 
  A / Pending
  B / Ready for Operation
  C / Ready for Operation
  D / Complete
  </code></pre>
  
  <p>JobView:</p>
  
  <pre><code>JobNumber / Status
  B / Ready for Operation
  C / Ready for Operation
  </code></pre>
  
  <p>JobOpTable</p>
  
  <pre><code>OpID / JobNumber / OperationNo / Data
  001 / B / 1 / Some text
  002 / B / 2 / Some text
  003 / C / 1 / Some text
  004 / D / 1 / some text
  005 / D / 2 / some text
  006 / D / 3 / some text
  </code></pre>
  
  <p>etc</p>
  
  <p>I would like to create a view, "JobOpView", that filters the above to only show the rows that have JobNumbers in "JobView".</p>
  
  <p>So based on the above data, the final view would show:</p>
  
  <pre><code>001 / B / 1 / Some text
  002 / B / 2 / Some text
  003 / C / 1 / Some text 
  </code></pre>
  
  <p>i.e. filter out JobNumber "D" data that isn't in "JobView".</p>
  
  <p>I'm not quite sure how to do this? Any help would be greatly appreciated.</p>
  
  <p>Thanks in advance,</p>