title: SQL query joining tables from different fdb databases
body: <p>I have 2 fdb databases <code>company.fdb</code> and <code>timeAtt.fdb</code></p>
  
  <p><code>company.fdb</code> contains <code>staffDetail</code> table</p>
  
  <pre><code>staffId       - 001
  staffName     - Andy
  staffStatus   - Active
  </code></pre>
  
  <p><code>timeAtt.fdb</code>contains <code>staffAtt</code> table</p>
  
  <pre><code>staffId         - 001
  staffName       - Andy
  timeIn          - 07:30
  timeOut         - 04:30
  LI              - X (late in)
  AB              - X (absent )
  remarks         - Emergency leave
  </code></pre>
  
  <p>Now, i would like to view the staff who was absent only which i did it this way</p>
  
  <pre><code>SELECT staffId,staffName,remarks FROM timeAtt.fdb WHERE AB = 'X'
  </code></pre>
  
  <p>But the problem is, the query also display inactive staff. So i need to join <code>staffAtt</code> from <code>timeAtt.fdb</code> and <code>staffDetail</code> from <code>company.fdb</code> to display only staff with active status. How can i do that?</p>