646:
647:
648: select bth.parent_territory_code
649: into vAreaCode
650: from bis_territory_hierarchies_v bth
651: where bth.parent_territory_type = 'AREA'
652: and bth.child_territory_type = 'COUNTRY'
653: and bth.child_territory_code = vGeoLevelValue;
654:
657: elsif vGeoLevel = 'REGION' /* Region */ then
658:
659: select bth.parent_territory_code
660: into vCountryCode
661: from bis_territory_hierarchies_v bth
662: where bth.parent_territory_type = 'COUNTRY'
663: and bth.child_territory_type = 'REGION'
664: and bth.child_territory_code = vGeoLevelValue;
665:
664: and bth.child_territory_code = vGeoLevelValue;
665:
666: select bth.parent_territory_name
667: into vAreaCode
668: from bis_territory_hierarchies_v bth
669: where bth.parent_territory_type = 'AREA'
670: and bth.child_territory_type = 'COUNTRY'
671: and bth.child_territory_code = vCountryCode;
672:
1128:
1129:
1130: select bth.parent_territory_code
1131: into vAreaCode
1132: from bis_territory_hierarchies_v bth
1133: where bth.parent_territory_type = 'AREA'
1134: and bth.child_territory_type = 'COUNTRY'
1135: and bth.child_territory_code = vGeoLevelValue;
1136:
1139: elsif vGeoLevel = 'REGION' /* Region */ then
1140:
1141: select bth.parent_territory_code
1142: into vCountryCode
1143: from bis_territory_hierarchies_v bth
1144: where bth.parent_territory_type = 'COUNTRY'
1145: and bth.child_territory_type = 'REGION'
1146: and bth.child_territory_code = vGeoLevelValue;
1147:
1146: and bth.child_territory_code = vGeoLevelValue;
1147:
1148: select bth.parent_territory_name
1149: into vAreaCode
1150: from bis_territory_hierarchies_v bth
1151: where bth.parent_territory_type = 'AREA'
1152: and bth.child_territory_type = 'COUNTRY'
1153: and bth.child_territory_code = vCountryCode;
1154: