Element Query

SELECT
PETF.ELEMENT_NAME “Element Entry Name”
, PAAF.PERSON_ID, PAPF.FULL_NAME “Employee Name”
, PIVF.NAME “Input Fields”
, PEEVF.EFFECTIVE_START_DATE “Entry Start Date”
, PEEVF.EFFECTIVE_END_DATE “Entry End Date”
, PEEVF.SCREEN_ENTRY_VALUE “Entry Values”

FROM PAY_ELEMENT_TYPES_F PETF
,PAY_ELEMENT_LINKS_F PELF
,PAY_ELEMENT_ENTRIES_F PEEF
,PER_ALL_ASSIGNMENTS_F PAAF
,PER_ALL_PEOPLE_F PAPF
,PAY_ELEMENT_ENTRY_VALUES_F PEEVF
,PAY_INPUT_VALUES_F PIVF

WHERE 1 = 1
AND PETF.ELEMENT_NAME = ‘&Entry_Name’
AND PELF.ELEMENT_TYPE_ID = PETF.ELEMENT_TYPE_ID
AND PEEF.ELEMENT_TYPE_ID = PETF.ELEMENT_TYPE_ID
AND TRUNC(SYSDATE) BETWEEN TRUNC(PEEF.EFFECTIVE_START_DATE) AND TRUNC(PEEF.EFFECTIVE_END_DATE)
AND PAAF.ASSIGNMENT_ID = PEEF.ASSIGNMENT_ID
AND TRUNC(SYSDATE) BETWEEN TRUNC(PAAF.EFFECTIVE_START_DATE) AND TRUNC(PAAF.EFFECTIVE_END_DATE)
AND PAPF.PERSON_ID = PAAF.PERSON_ID
AND PAPF.CURRENT_EMP_OR_APL_FLAG = ‘Y’
AND TRUNC(SYSDATE) BETWEEN TRUNC(PAPF.EFFECTIVE_START_DATE) AND TRUNC(PAPF.EFFECTIVE_END_DATE)

AND PEEVF.ELEMENT_ENTRY_ID = PEEF.ELEMENT_ENTRY_ID

AND PIVF.INPUT_VALUE_ID = PEEVF.INPUT_VALUE_ID

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s