/*select hl.lookup_code AcRank,
ht.lookup_code TenStat,
decode( hl.lookup_code, '01', 'Other Faculty', hl.meaning) AcMeaning,
decode (ht.lookup_code, '01', 'Faculty with Tenure', '02', 'Non-Tenured Faculty (Those on tenure track)', '03', 'Non-Tenured Faculty (Those not on tenure track)', ht.meaning) TenMeaning,
PQH_PQIPED8_XMLP_PKG.cf_grouptottitleformula(ht.lookup_code) CF_GroupTotTitle,
PQH_PQIPED8_XMLP_PKG.cf_grouplinenumformula(ht.lookup_code) CF_groupLineNum,
PQH_PQIPED8_XMLP_PKG.cf_1formula() line
from hr_lookups hl,
hr_lookups ht
where hl.lookup_type = 'PQH_ACADEMIC_RANK'
and ht.lookup_type = 'PQH_TENURE_STATUS'
and ht.lookup_code in ('01', '02','03')
order by TenStat,TenMeaning,AcRank desc,AcMeaning desc*/
select AcRank,TenStat,AcMeaning,TenMeaning,CF_GroupTotTitle,CF_groupLineNum,PQH_PQIPED8_XMLP_PKG.cf_1formula() line,rownum from
( select hl.lookup_code AcRank,
ht.lookup_code TenStat,
decode( hl.lookup_code, '01', 'Other Faculty', hl.meaning) AcMeaning,
decode (ht.lookup_code, '01', 'Faculty with Tenure', '02', 'Non-Tenured Faculty (Those on tenure track)', '03', 'Non-Tenured Faculty (Those not on tenure track)', ht.meaning) TenMeaning,
PQH_PQIPED8_XMLP_PKG.cf_grouptottitleformula(ht.lookup_code) CF_GroupTotTitle,
PQH_PQIPED8_XMLP_PKG.cf_grouplinenumformula(ht.lookup_code) CF_groupLineNum
from hr_lookups hl,
hr_lookups ht
where hl.lookup_type = 'PQH_ACADEMIC_RANK'
and ht.lookup_type = 'PQH_TENURE_STATUS'
and ht.lookup_code in ('01', '02','03')
order by TenStat,TenMeaning,AcRank desc,AcMeaning desc) |