329: ) RETURN VARCHAR2
330: IS
331: /*CURSOR c_location_type_code(c_site_id NUMBER) IS
332: SELECT pn.location_type_lookup_code
333: FROM pn_locations_all pn
334: ,rrs_sites_b site
335: WHERE site.property_location_id = pn.location_id
336: AND site.site_id = c_site_id ;
337:
336: AND site.site_id = c_site_id ;
337:
338: CURSOR c_building(c_site_id NUMBER) IS
339: SELECT pn.building
340: FROM pn_locations_all pn
341: ,rrs_sites_b site
342: WHERE site.property_location_id = pn.location_id
343: AND site.site_id = c_site_id ;
344:
343: AND site.site_id = c_site_id ;
344:
345: CURSOR c_floor(c_site_id NUMBER) IS
346: SELECT pn.floor
347: FROM pn_locations_all pn
348: ,rrs_sites_b site
349: WHERE site.property_location_id = pn.location_id
350: AND site.site_id = c_site_id ;
351:
350: AND site.site_id = c_site_id ;
351:
352: CURSOR c_office(c_site_id NUMBER) IS
353: SELECT pn.office
354: FROM pn_locations_all pn
355: ,rrs_sites_b site
356: WHERE site.property_location_id = pn.location_id
357: AND site.site_id = c_site_id ;
358:
355: ,rrs_sites_b site
356: WHERE site.property_location_id = pn.location_id
357: AND site.site_id = c_site_id ;
358:
359: l_location_type_lookup_code pn_locations_all.location_type_lookup_code%TYPE ;
360: l_location_name VARCHAR2(30);
361:
362: BEGIN
363: OPEN c_location_type_code(p_site_id);
379: END IF ;
380: RETURN l_location_name ;*/
381: CURSOR c_location_code(c_site_id NUMBER) IS
382: SELECT pn.location_code
383: FROM pn_locations_all pn
384: ,rrs_sites_b site
385: WHERE site.property_location_id = pn.location_id
386: AND site.site_id = c_site_id ;
387:
384: ,rrs_sites_b site
385: WHERE site.property_location_id = pn.location_id
386: AND site.site_id = c_site_id ;
387:
388: l_location_code pn_locations_all.location_code%TYPE ;
389:
390: BEGIN
391: OPEN c_location_code(p_site_id);
392: FETCH c_location_code INTO l_location_code ;
400: ) RETURN VARCHAR2
401: IS
402: CURSOR c_property_name(c_location_id NUMBER) IS
403: SELECT prop.property_name
404: FROM pn_locations_all pn
405: ,pn_properties_all prop
406: WHERE pn.location_id = c_location_id
407: AND prop.property_id = pn.property_id ;
408: