title: mysql, to get rows in tblA that aren't in tblB for an item in tblB
body: <p>I'm trying to get a query to get the batchuuid from the batchTBL 
  that aren't in the JobBatchStatusTBL..</p>
  
  <p>I've tried a couple of different queries trying to use something like:</p>
  
  <pre><code>select * 
  from BatchTBL as ba 
  left join JobBatchStatusTBL as j 
  on ba.BatchUUID=j.BatchUUID
  join JobTBL as j2 
  on j.JobUUID=j2.JobUUID
  where j.batchuuid IS NULL
  and j.JobUUID = 'ecd0fab8-8bf1-83cc-b1d7-495034a55618';
  </code></pre>
  
  <p>but i'm screwing something up...</p>
  
  <p>any thoughts?</p>
  
  <p>thanks</p>
  
  <pre><code>mysql&gt; select BatchName,BatchUUID from BatchTBL;
  +-----------+--------------------------------------+
  | BatchName | BatchUUID                            |
  +-----------+--------------------------------------+
  | aa        | d288ff51-d045-d218-52fd-93e3523db85e |
  | aa1       | a288ff51-d045-d218-52fd-93e3523db85e |
  | aa3       | d188ff51-d045-d218-52fd-93e3523db85e |
  | aaa3      | da88ff51-d045-d218-52fd-93e3523db85e |
  | baa3      | db88ff51-d045-d218-52fd-93e3523db85e |
  | z1        | 7eedfea4-c498-ed6e-f0dd-1397fe7dbd67 |
  | d1        | 34781dba-d99c-82e3-f499-b55ded863f81 |
  | nb        | 1dd56d9c-daed-7f9f-c13b-246d2ec96513 |
  | ds        | cca9a771-b5ef-5926-4c26-21151215a800 |
  | a1        | 1bb51584-e68a-21d1-a2df-e07707591b43 |
  +-----------+--------------------------------------+
  10 rows in set (0.00 sec)
  
  mysql&gt; select JobName,JobUUID from JobTBL;
  +---------+--------------------------------------+
  | JobName | JobUUID                              |
  +---------+--------------------------------------+
  | aa      | 8afa9cf4-bf63-a4cd-3cd9-cbc6d17f84be |
  | aa1     | ecd0fab8-8bf1-83cc-b1d7-495034a55618 |
  +---------+--------------------------------------+
  2 rows in set (0.00 sec)
  
  mysql&gt; select JobUUID,BatchUUID from JobBatchStatusTBL;
  +--------------------------------------+--------------------------------------+
  | JobUUID                              | BatchUUID                            |
  +--------------------------------------+--------------------------------------+
  | ecd0fab8-8bf1-83cc-b1d7-495034a55618 | d288ff51-d045-d218-52fd-93e3523db85e |
  +--------------------------------------+--------------------------------------+
  1 row in set (0.00 sec)
  </code></pre>
  
  <p>thanks</p>