Showing posts with label Payroll Queries. Show all posts
Showing posts with label Payroll Queries. Show all posts

Friday, July 3, 2015

Payroll Employee Balances

--Payroll Employee Balances
Select * from
PAY_BALANCE_VALUES_V PBV
where
PBV.ASSIGNMENT_ID = 106
and pbv.BALANCE_NAME like 'Housing Loan%'
and pbv.Dimension_name like 'Assignment Inception To Date'

--Payroll
Select papf.EMPLOYEE_NUMBER, pbv.*
from
per_all_people_f papf,
per_all_assignments_f paaf,
PAY_ASSIGNMENT_ACTIONS pyaa,
PAY_BALANCE_VALUES_V PBV
where
papf.PERSON_ID = paaf.PERSON_ID
and paaf.ASSIGNMENT_ID = pbv.ASSIGNMENT_ID
and pyaa.ASSIGNMENT_ACTION_ID = pbv.ASSIGNMENT_ACTION_ID
and pyaa.ASSIGNMENT_ID = paaf.ASSIGNMENT_ID
--PBV.ASSIGNMENT_ID = 106
and pbv.BALANCE_NAME like 'Housing Loan%'
and pbv.Dimension_name like 'Assignment Inception To Date'

--Payroll
Select papf.EMPLOYEE_NUMBER,
 pbv.*
from
per_all_people_f papf,
per_all_assignments_f paaf,
PAY_ASSIGNMENT_ACTIONS pyaa,
PAY_BALANCE_VALUES_V PBV
where
papf.PERSON_ID = paaf.PERSON_ID
and paaf.ASSIGNMENT_ID = pbv.ASSIGNMENT_ID
and pyaa.ASSIGNMENT_ACTION_ID = pbv.ASSIGNMENT_ACTION_ID
and pyaa.ASSIGNMENT_ID = paaf.ASSIGNMENT_ID
and PBV.ASSIGNMENT_ID = '1005'
--and pbv.BALANCE_NAME like 'Housing Loan%'
and pbv.Dimension_name like 'Assignment Inception To Date'
and pbv.EFFECTIVE_DATE > to_date ('06/15/2009','MM/DD/YYYY')