INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

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.

Jobs

Problems with YTD Accumulator report - employees are missing!

Problems with YTD Accumulator report - employees are missing!

(OP)
I am trying to create a report that shows selected YTD accumulators for everyone. We have three paygroups, I am building my report using only one for simplicity and testing. The problem is that I have two employees in this paygroup who were active as of 12/31/10, but have since terminated. Their YTD information as of 12/31/10 is not showing in the report. I am using ReportSmith 3.1.

Here is the SQL:

SELECT
"PS_EMPLOYEES"."EMPLID", "PS_EMPLOYEES"."NAME", "PS_EMPLOYEES"."PAYGROUP", "PS_EMPLOYEES"."FILE_NBR", "PS_AL_YTD_ACCUM"."ACCUM_AMOUNT", "PS_AL_YTD_ACCUM"."ACCUM_NBR", "PS_AL_YTD_ACCUM"."AL_PROCESS_EFFDT"
FROM
"PS_EMPLOYEES", "PS_AL_YTD_ACCUM"
WHERE
(((("PS_EMPLOYEES"."EFFSEQ"= (
    SELECT MAX("INNERALIAS"."EFFSEQ")
    FROM "PS_EMPLOYEES" INNERALIAS
    WHERE "INNERALIAS"."EMPLID" = "PS_EMPLOYEES"."EMPLID"
    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"."EFFDT" <=  TO_DATE('2010-12-31', 'YYYY-MM-DD')))) AND
("PS_EMPLOYEES"."PAYGROUP" = '8DG') AND
("PS_AL_YTD_ACCUM"."AL_PROCESS_EFFDT" = TO_DATE('2010-12-28', 'YYYY-MM-DD')) AND
("PS_AL_YTD_ACCUM"."ACCUM_NBR" IN( 'AD', 'CN', 'CX', 'C3', 'DK', 'DP', 'DU', 'D4', 'EC', 'EQ', 'EV', 'E5', 'E9', 'FD', 'FH', 'R2', 'R6', 'C7', 'AH')) AND
("PS_AL_YTD_ACCUM"."WEEK_NBR" = '52')))
AND
("PS_AL_YTD_ACCUM"."FILE_NBR" = "PS_EMPLOYEES"."FILE_NBR" )
GROUP BY
"PS_EMPLOYEES"."EMPLID", "PS_EMPLOYEES"."NAME", "PS_EMPLOYEES"."PAYGROUP", "PS_EMPLOYEES"."FILE_NBR", "PS_AL_YTD_ACCUM"."ACCUM_AMOUNT", "PS_AL_YTD_ACCUM"."ACCUM_NBR", "PS_AL_YTD_ACCUM"."AL_PROCESS_EFFDT"
ORDER BY
"PS_AL_YTD_ACCUM"."ACCUM_NBR"

I believe the problem lies in the effective date of the PS_EMPLOYEES table but I'm not sure how to indicate I need all employees and selected accumulators, whether they were active or not on 12/31. Thanks for any help!

RE: Problems with YTD Accumulator report - employees are missing!

(OP)
Sorry..I realized I should be using the PS_ALL_EMPLOYEES.  

RE: Problems with YTD Accumulator report - employees are missing!


From the ADP Data Dictionary:
ADP Enterprise HR Data Dictionary

EMPLOYEES

This table is created by running an SQR program that selects particular columns from the following tables that are current at the time the program runs: PS_PERSONAL_DATA, PS_EMPLOYMENT, PS_JOB, PS_JOBCODE_TBL, PS_DEPT_TBL, PSASOFDATE


I would use PS_PERSONAL_DATA ==> PS_EMPLOYMENT ==> PS_JOB ==> PS_AL_YTD_DATA ==> PS_AL_YTD_ACCUM

Now you know you have the unfiltered data and it is just Selections that you need to work on...

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!

Resources

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