×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Max EFFDT when pay Action = LOA ?

Max EFFDT when pay Action = LOA ?

Max EFFDT when pay Action = LOA ?

(OP)
Hi there

I am trying to find the MAX EFFDT from PS_EMPLOYEES (alias EE) where ACTION = LOA.  It appears that we have PAY and XFR actions when an employee is on Leave, so pulling the effdt date of the table is not getting me the correct information.  Any help to guide me would be appreciated!

RE: Max EFFDT when pay Action = LOA ?

Convert the PS_EMPLOYEES, Effective Date, Selection Critera to SQL and add this line to it.  AND "INNERALIAS"."ACTION" = 'LOA'  This will get you the MAX dated LOA action.  

Also look at: http://charlescook.com/PPS/ADP/ReportSmith/Enterprise/Introduction-To-Effective-Dated-Tables.pps

("PS_EMPLOYEES"."EFFSEQ"= (
    SELECT MAX("INNERALIAS"."EFFSEQ")
    FROM "PS_EMPLOYEES" INNERALIAS
    WHERE "INNERALIAS"."EMPLID" = "PS_EMPLOYEES"."EMPLID"
    AND "INNERALIAS"."EMPL_RCD_NBR" = "PS_EMPLOYEES"."EMPL_RCD_NBR"
    AND "INNERALIAS"."EFFDT" = "PS_EMPLOYEES"."EFFDT")
AND
"PS_EMPLOYEES"."EFFDT" = (
    SELECT MAX("INNERALIAS"."EFFDT")
    FROM "PS_EMPLOYEES" INNERALIAS
    WHERE "INNERALIAS"."EMPLID" = "PS_EMPLOYEES"."EMPLID"
    AND "INNERALIAS"."EMPL_RCD_NBR" = "PS_EMPLOYEES"."EMPL_RCD_NBR"
    AND "INNERALIAS"."ACTION" = 'LOA'
    AND "INNERALIAS"."EFFDT" <= SYSDATE))

http://CharlesCook.com
Specializing in ReportSmith Training and Consulting

RE: Max EFFDT when pay Action = LOA ?

(OP)
Charles - I was actually able to get the data I was needing by using the statement below in my selection criteria.  Thanks for your power point by the way!  Mighty Helpful

(SELECT MAX (B.REVIEW_DT) FROM
PS_EMPLOYEE_REVIEW B WHERE
REVIEW.EMPLID=B.EMPLID
AND B.REVIEW_DT <= <<ReportsEffectiveDate, "'"dd"-"mmm"-"yyyy"'">>)

RE: Max EFFDT when pay Action = LOA ?

You’re welcome.  Glad you got it working...

http://CharlesCook.com
Specializing in ReportSmith Training and Consulting

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close