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