DBA Data[Home] [Help]

VIEW: APPS.PAY_US_GTN_TAX_UNITS_V

Source

View Text - Preformatted

SELECT distinct tuv.tax_unit_id, tuv.name, hrl.location_id, hrl.location_code, paf.organization_id, null organization_name, 'L' type from pay_us_asg_reporting asg, hr_tax_units_v tuv, hr_locations hrl, per_all_assignments_f paf where hrl.location_id=paf.location_id and asg.tax_unit_id=tuv.tax_unit_id and asg.assignment_id=paf.assignment_id and sysdate between paf.effective_start_date and paf.effective_end_date union select tuv.tax_unit_id, tuv.name, hrl.location_id, hrl.location_code, paf.organization_id, hou.name organization_name, 'O' type from pay_us_asg_reporting asg, hr_locations hrl, hr_tax_units_v tuv, hr_all_organization_units hou, per_all_assignments_f paf where asg.tax_unit_id=tuv.tax_unit_id and tuv.location_id=hrl.location_id and paf.assignment_id=asg.assignment_id and hou.organization_id=paf.organization_id and sysdate between paf.effective_start_date and paf.effective_end_date union select asg.tax_unit_id, tuv.name, fnd_number.canonical_to_number(null) location_id, null location_code, fnd_number.canonical_to_number(null) organization_id, null organization_name, 'G' type from pay_us_asg_reporting asg, hr_tax_units_v tuv where tuv.tax_unit_id=asg.tax_unit_id
View Text - HTML Formatted

SELECT DISTINCT TUV.TAX_UNIT_ID
, TUV.NAME
, HRL.LOCATION_ID
, HRL.LOCATION_CODE
, PAF.ORGANIZATION_ID
, NULL ORGANIZATION_NAME
, 'L' TYPE
FROM PAY_US_ASG_REPORTING ASG
, HR_TAX_UNITS_V TUV
, HR_LOCATIONS HRL
, PER_ALL_ASSIGNMENTS_F PAF
WHERE HRL.LOCATION_ID=PAF.LOCATION_ID
AND ASG.TAX_UNIT_ID=TUV.TAX_UNIT_ID
AND ASG.ASSIGNMENT_ID=PAF.ASSIGNMENT_ID
AND SYSDATE BETWEEN PAF.EFFECTIVE_START_DATE
AND PAF.EFFECTIVE_END_DATE UNION SELECT TUV.TAX_UNIT_ID
, TUV.NAME
, HRL.LOCATION_ID
, HRL.LOCATION_CODE
, PAF.ORGANIZATION_ID
, HOU.NAME ORGANIZATION_NAME
, 'O' TYPE
FROM PAY_US_ASG_REPORTING ASG
, HR_LOCATIONS HRL
, HR_TAX_UNITS_V TUV
, HR_ALL_ORGANIZATION_UNITS HOU
, PER_ALL_ASSIGNMENTS_F PAF
WHERE ASG.TAX_UNIT_ID=TUV.TAX_UNIT_ID
AND TUV.LOCATION_ID=HRL.LOCATION_ID
AND PAF.ASSIGNMENT_ID=ASG.ASSIGNMENT_ID
AND HOU.ORGANIZATION_ID=PAF.ORGANIZATION_ID
AND SYSDATE BETWEEN PAF.EFFECTIVE_START_DATE
AND PAF.EFFECTIVE_END_DATE UNION SELECT ASG.TAX_UNIT_ID
, TUV.NAME
, FND_NUMBER.CANONICAL_TO_NUMBER(NULL) LOCATION_ID
, NULL LOCATION_CODE
, FND_NUMBER.CANONICAL_TO_NUMBER(NULL) ORGANIZATION_ID
, NULL ORGANIZATION_NAME
, 'G' TYPE
FROM PAY_US_ASG_REPORTING ASG
, HR_TAX_UNITS_V TUV
WHERE TUV.TAX_UNIT_ID=ASG.TAX_UNIT_ID