我在安特遣部队2012年有一个AOT询问,其中包括HcmWorker和HcmEmployment表(以及其他表格)。 我的问题是,当我编写报告(而不是SSRS)或以其他方式使用这种询问时,我只给雇员一个有效的时间。
I would like to get all employees that has a record in this table, even if they doesn t have a current employment - and only once. The optimal solution is to get the record from HcmEmployment for the current employment, if it exists, and otherwise the last record with a start date before "now". However, I can accept a solution where it joins with the last start date.
我更喜欢一种解决办法,即我不需要在我使用时增加代码(即在阿塔查询中解决)。
I have tried setting the validTimeStateDateTimeRange property on the query from code, which resulted in duplicate lines if the employee has several employments.
如果我把HcmEmployment数据来源确定为ExistsJoin,先是,那么,它就是为了一种观点,而不是报告(制造重复记录): 对报告采用这种观点并不是一种选择,因为用户需要能够过滤HcmEmployment的过失。
How can I solve this problem?