Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compensation Rate at Hire

Status
Not open for further replies.

Theredia01

Technical User
Oct 26, 2006
13
0
0
US
I need to add a row of compensation Data to my report. I have a basic roster with current Hrly rate. I need to add Hrly rate when hired or as of the job title change that matches the current job title. Seems tricky to me, but it is really late...help, please.

ADP Enterprise-Oracle
 
Hi Theredia,

I have something that will work for you. First, some assumptions. I am assuming you are using the PS_JOB table and have PAYGROUP and FILE_NBR selected for your report or at least for query only. Next, if you don't already have a table alias assigned for this table, please assign a J as the alias. It's simple and hard to misspell. :)

Next, create a new derived field - I called mine HIRE_RATE.

Paste this into the formula box:

(
SELECT JOB.ANNUAL_RT
FROM PS_JOB JOB
WHERE (( (TO_CHAR(JOB.EFFDT, 'YYYYMMDD') || JOB.EFFSEQ = (
SELECT MIN(TO_CHAR(i.EFFDT, 'YYYYMMDD') || i.EFFSEQ)
FROM PS_JOB i
WHERE JOB.EMPLID = i.EMPLID
AND JOB.EMPL_RCD_NBR = i.EMPL_RCD_NBR)) AND
(JOB.PAYGROUP = J.PAYGROUP) AND
(JOB.FILE_NBR = J.FILE_NBR) ))
)

Remember the open and closed () and there should be a space before each line of the formula code.

This formula will select the ANNUAL_RT field from the PS_JOB table and give it the JOB alias. It is using a SELECT MIN SQL statement to get the minimum row from the PS_JOB table. The last two lines uses 2 key fields to connect itself back to the PS_JOB table you already have in your report.

I hope this helps. If you have any questions, feel free to contact me directly at RSGEEK @ WI . RR . COM

Tammy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top