You are currently viewing How to pull UK Calculation Card Info?
How to pull UK Calculation Card Info?
- How to pull UK Calculation Card Info?
Total Visits: 12

In this article we will try to pull the Calculation Card info for UK Legislation.

SQL Query to pull the PAYE TAX CODE for UK Calculation Card:

SELECT PAPF.PERSON_Number
	,PPNF.FULL_NAME
	,PDCDF.DIR_INFORMATION_CHAR2 PAYE_TAX_CODE
FROM pay_dir_card_components_f PDCC
	,pay_dir_cards_f PDCF
	,pay_pay_relationships_dn PPR
	,per_all_people_f PAPF
	,PAY_DIR_COMP_DETAILS_F PDCDF
	,pay_dir_card_comp_defs_f PDCCDF
	,per_person_names_f PPNF
WHERE PDCC.DIR_CARD_COMP_DEF_ID = PDCCDF.DIR_CARD_COMP_DEF_ID
	AND PDCCDF.base_component_name = 'GB_PAYE'
	AND PDCF.DIR_CARD_ID = PDCC.DIR_CARD_ID
	AND PDCDF.DIR_CARD_COMP_ID = PDCC.DIR_CARD_COMP_ID
	AND PDCDF.PERSON_ID = PAPF.PERSON_ID
	AND PDCDF.DIR_INFORMATION_CATEGORY = 'HRX_GB_PAYE'
	AND PDCF.PAYROLL_RELATIONSHIP_ID = PPR.PAYROLL_RELATIONSHIP_ID
	AND PAPF.Person_ID = PPR.PERSON_ID
	AND PPNF.PERSON_ID = PAPF.PERSON_ID
	AND PPNF.NAME_TYPE = 'GLOBAL'
	AND SYSDATE BETWEEN PDCC.Effective_Start_Date
		AND PDCC.Effective_End_Date
	AND SYSDATE BETWEEN PAPF.Effective_Start_Date
		AND PAPF.Effective_End_Date		
	AND SYSDATE BETWEEN PPNF.Effective_Start_Date
		AND PPNF.Effective_End_Date			
	AND SYSDATE BETWEEN PDCDF.Effective_Start_Date
		AND PDCDF.Effective_End_Date
	AND SYSDATE BETWEEN PDCF.Effective_Start_Date
		AND PDCF.Effective_End_Date
	AND SYSDATE BETWEEN PDCCDF.Effective_Start_Date
		AND PDCCDF.Effective_End_Date
ORDER BY PAPF.PERSON_Number