It's been this way for at least 13 years.
Oracle assumes that the MAX row we want to see is on the main record (A). And we usually would not want to see any row on the outer-joined record (B) that exceeds the EffDt of that row since it would not yet be in effect (i.e. it would be future-dated as of the EffDt of the row on the main record, for each corresponding employee or student or whatever).
So, PSQuery creates the autojoined criteria:
A.EffDt EffectiveDate<= Current Date
B.Effdt EffectiveDate<= A.Effdt
If MAX(A.EffDt) happens to be SYSDATE, then MAX(B.EffDt) will also be SYSDATE ...but, only where A.Effdt is.
There are many occasions where always want the most recent data from the B.record no matter what the EffDt of the A.row is. In that case, we would need to manually modify the B.EffDt criteria to:
B.EffDt EffectiveDate<= Current Date, left-outer-join on B
FYI: This is very useful when you're looking for EEs or students that "had an 'X' between date1 and date2" and you need their current Name or Mailing Address, etc. so somebody can contact them.
------------------------------
Scott Frey
Senior Data Analyst - Human Resource Information Systems
University of Colorado System
------------------------------
Message from the HEUG Marketplace:------------------------------
Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the
HEUG Marketplace.
------------------------------