1

我正在使用 Peoplesoft 查询管理器在 people soft 中构建查询。

我正在尝试从日期列中提取最近的日期。我尝试使用 max() 作为表达式,但是,查询不提取任何记录。我已经与另一位同事核实过,他们从未能够使用 max() 提取记录。

有没有其他方法或解决方法来提取最新记录?

4

4 回答 4

0

So I figured out why no results were returned when using Max in a subquery. It was more from a lack of understanding PeopleSoft and SQL since I am relatively new to it. When I was setting the date column in the subquery as max for the aggregate to be used as criteria to compare to the date column in the main query I didn't make any criteria in the subquery. This meant that the subquery would go through all dates for all employees except for the employee that I was specifying in a prompt and returning a value that didn't match any of the dates for the employee in the main query and returning no one. This was fixed by setting a criteria in the subquery that the employee ID that had to be searched in the subquery matched the one that was typed into the prompt in the main query

于 2012-08-14T13:50:08.077 回答
0

使用生效日期来获取最近的日期,最大值在 PeopleSoft 中可能无法正常工作。查询应有效日期

于 2013-02-07T05:03:35.373 回答
0

在使用 PSQuery 时使用生效日期进行此类搜索。

于 2012-09-21T05:59:37.567 回答
0

PS Query has built in filters for EFFDT tables. When you add a criteria on the EFFDT field, there are some additional drop down choices on the "condition type" field like 'Eff Date <' and 'Eff Date <=', etc. Usually, when you create a query for an Effective dated table, PS Query will automatically add the subquery based on the 'Eff Date <=' condition type.

于 2019-01-17T05:44:10.173 回答