I have the following sql query and I want to filter out active employees (workers) only. I am new to AX 2012 and so I am not sure how to do this with the new tables because there doesn't seem to be a status field anymore. I appreciate any advice. - Thanks!
Select
e.personnelnumber as EmployeeId,
dir.name as 'Employee Name',
ptp.categoryid,
ptp.qty,
ptp.projtransdate
from projtransposting ptp
join DimensionAttributeValueCombination dimattr
on dimattr.recid = ptp.LedgerDimension
join mainAccount mAcc
on mAcc.Recid = dimattr.MainAccount
left outer join hcmworker e
on ptp.worker = e.recid
left outer join dirpartytable dir
on e.person=dir.recid
where ptp.dataareaid = 'al'
and (ptp.ledgertransdate >= '01/01/2014'
and ptp.ledgertransdate <= '01/31/2014')
and CATEGORYID = 'pto'
and left (e.personnelnumber,3) != '330%'
order by 1