6594: and product_b.organization_id = inc.inv_organization_id
6595: and inc.cp_subcomponent_id = instance.instance_id )
6596: , inc.inv_subcomponent_version ) SubComponentRevision
6597: ,(CASE WHEN inc.incident_location_id is not null and
6598: inc.incident_location_type ='HZ_LOCATIONS' THEN
6599: (select loc.address1 || nvl2(loc.address2,', '||loc.address2,null) ||
6600: nvl2(loc.address3,', '||loc.address3,null) ||
6601: nvl2(loc.address4,', '||loc.address4,null) ||
6602: nvl2(loc.city, ','||loc.city,null) ||
6603: nvl2(loc.state, ','||loc.state,null) ||
6604: nvl2(loc.province, ','||loc.province,null) ||
6605: nvl2(loc.postal_code, ' '||loc.postal_code,null) ||
6606: nvl2(loc.country, ' '||loc.country,null)
6607: from hz_locations loc
6608: where loc.location_id = inc.incident_location_id )
6609: WHEN inc.incident_location_id is not null and inc.incident_location_type
6610: ='HZ_PARTY_SITE' THEN
6611: (select loc.address1 || nvl2(loc.address2,', '||loc.address2,null) ||
6615: nvl2(loc.state, ','||loc.state,null) ||
6616: nvl2(loc.province, ','||loc.province,null) ||
6617: nvl2(loc.postal_code, ' '||loc.postal_code,null) ||
6618: nvl2(loc.country, ' '||loc.country,null)
6619: from hz_locations loc,
6620: hz_party_sites hzp
6621: where inc.incident_location_id = hzp.party_site_id
6622: and hzp.location_id = loc.location_id )
6623: ELSE inc.incident_address ||