select JobCode, JobType, SalCode, SalRange,CF_group_lineno,CF_GroupTotTitle,
PQH_PQIPED6_XMLP_PKG.line1Formula() line_no ,rownum from
(select to_number(hl.lookup_code) JobCode,
hl.meaning JobType,
hs.lookup_code SalCode,
decode(hl.lookup_code, '8' , decode(hs.lookup_code,'01', 'Below $20,000', '02', '20,000-29,999', '03', '30,000-39,999',
'04','40,000-49,999','05','50,000 and above'), '9', decode(hs.lookup_code,'01', 'Below $20,000', '02', '20,000-29,999', '03', '30,000-39,999',
'04','40,000-49,999','05','50,000 and above'), '10', decode(hs.lookup_code,'01', 'Below $20,000', '02', '20,000-29,999', '03', '30,000-39,999',
'04','40,000-49,999','05','50,000 and above'), '11',decode(hs.lookup_code,'01', 'Below $20,000', '02', '20,000-29,999', '03', '30,000-39,999',
'04','40,000-49,999','05','50,000 and above'), hs.meaning) SalRange,
PQH_PQIPED6_XMLP_PKG.cf_group_linenoformula(to_number ( hl.lookup_code )) CF_group_lineno,
PQH_PQIPED6_XMLP_PKG.cf_grouptottitleformula(to_number(hl.lookup_code)) CF_GroupTotTitle
--PQH_PQIPED6_XMLP_PKG.line1Formula() line_no
from hr_lookups hl,
hr_lookups hs
where hl.lookup_type = 'US_IPEDS_JOB_CATEGORIES'
and hl.lookup_code not in ('1', '2' ,'3','4', '12')
and hs.lookup_type = 'PQH_SALARY_RANGE'
order by to_number(hl.lookup_code), SalCode ) |