Operation Details
Description: Called to retrieve a summary details record, including name and address, for a utility.
Sterotype: ns
SQL
SELECT
  Utility.primaryAlternateID,
  Utility.concernRoleID,
  Utility.name,
  Utility.registeredName,
  Utility.utilityTypeCode,
  ConcernRole.sensitivity,
  city.elementValue,
  addressLine1.elementValue
INTO
  :primaryAlternateID,
  :concernRoleID,
  :name,
  :registeredName,
  :utilityTypeCode,
  :sensitivity,
  :city,
  :addressLine1 
FROM
  Utility,
  ConcernRole,
  AddressElement city,
  AddressElement addressLine1 
WHERE ConcernRole.concernRoleID IN 
  ( 
  SELECT
    concernRoleID 
  FROM
    concernRoleAlternateID 
  WHERE concernRoleAlternateID.alternateID = :primaryAlternateID 
  ) 
  AND Utility.concernRoleID = ConcernRole.concernRoleID 
  AND 
  (
    city.addressID = ConcernRole.primaryAddressID 
    AND city.elementType = :cityType 
  ) 
  AND 
  (
    addressLine1.addressID = ConcernRole.primaryAddressID 
    AND addressLine1.elementType = :addressLine1Type 
  )