title: SQL query lookup 2 values from another table
body: <p>I have 3 tables:</p>
  
  
  
  <pre class="lang-none prettyprint-override"><code>1) JCTransactions
  Job         CostCode    Date        Amount
  36801-001   01-150      1/8/2015    55.00
  36801-001   02-240      2/6/2015    26.00
  
  2) JCCostCode
  Job         CostCode    Description
  36801-001   01-000      Land
  36801-001   01-150      Land Legal Fees
  36801-001   02-000      Holding Costs
  36801-001   02-240      Property Taxes
  
  3) JCJob
  Job         Description
  36801-001   BusinessCenter1
  36901-001   BusinessCenter2(NotYetStarted)
  </code></pre>
  
  <p>I want to do a query that shows all the records from the JCTransactions table but with Job description, cost code description, and top level cost code description.</p>
  
  <p>For example:</p>
  
  <pre class="lang-none prettyprint-override"><code>Job         CostCode    Date        Amount  JobDesc         CostCodeDesc    TopLevelCostCode    TopLevelCodeDesc
  36801-001   01-150      1/8/2015    55.00   BusinessCenter1 Land Legal Fees 01-000              Land
  36801-001   02-240      2/6/2015    26.00   BusinessCenter1 Property Taxes  02-000              Holding Costs
  </code></pre>
  
  <p>I'm having trouble getting the TopLevelCostCode and their descriptions into the results.</p>
  
  <p>Here's my code so far which works well except it doesn't have the last 2 column that I want:</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT JCTRANSACTIONS.Job,
  JCTRANSACTIONS.CostCode,
  JCTRANSACTIONS.Date,
  JCTRANSACTIONS.Amount,
  JCJOB.Description,
  JCCOSTCODE.Description
  FROM "\\Network\".JCCOSTCODE JCCOSTCODE,
  "\\ Network \".JCJOB JCJOB,
  "\\ Network \".JCTRANSACTIONS JCTRANSACTIONS
  WHERE 
  JCJOB.Job = JCTRANSACTIONS.Job AND 
  JCCOSTCODE.Cost_Code = JCTRANSACTIONS.Cost_Code AND 
  JCCOSTCODE.Job = JCJOB.Job AND 
  JCCOSTCODE.Job = JCTRANSACTIONS.Job
  </code></pre>