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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control Hours Report

Status
Not open for further replies.

Theredia01

Technical User
Oct 26, 2006
13
US
Good afternood;
I have a report bulit to give me Ctrl Hrs 1, currently I have to type in the Process effective date. I would like to automate this process to pull in the Max process effdt. Does anyone know how to do this?

-Enterprise V3.
Table I'm using is:
PS_AL_YTD_CNTL_HRS.AL_PROCESS_EFFDT

-Thank you [ponytails]
 
In your select criteria, you will need to write a MAX statement. I am making two assumptions in the following, that your table alias is CNTL_HRS, and that your key field is EMPL ID

FollOw this:
Data Field CNTL_HRS.AL_PROCESS_EFFDT is equal to formula:

(SELECT MAX (AL_PROCESS_EFFDT) FROM
PS_AL_YTD_CNTL_HRS A WHERE
CNTL_HRS.EMPLID=A.EMPLID)
 
The control hrs table does not contain emplid. I changed to File_nbr, but am getting a missing expression message. Any suggestions?
I would paste a copy of my selection, but not sure how to do that. [ponder]

 
Wait, I got it. But its only pulling the Max for the pay group just processed. I'm thinking I need to add an any statement to get the max of all paygroups???

FYI-
This is how I got it it work
(SELECT MAX (AL_PROCESS_EFFDT) FROM
SYSADM.PS_AL_YTD_CNTL_HRS A WHERE
FILE_NBR=A.FILE_NBR)

Were on Oracle.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top