select evt_object AS evt_object,
evt_object_desc AS evt_object_desc,
evt_object_org AS evt_object_org,
evt_obtype AS evt_obtype,
( 
           SELECT UCO_DESC
             FROM r5ucodes
            WHERE uco_rentity = 'OBTP' 
                  AND
                  UCO_CODE = evt_obtype 
       )
       AS equipmenttype,
evt_mrc AS evt_mrc,
evt_location AS evt_location,
evt_location_org AS evt_location_org,
evt_costcode AS evt_costcode,
evt_safety AS evt_safety,
evt_warranty AS evt_warranty,
evt_code AS evt_code,
evt_status AS evt_status,
evt_parent AS evt_parent,
evt_routeparent AS evt_routeparent,
e.DMLTYPE as DMLType,
obj_gisobJID AS EVT_OBJECT_GISOBJID,
obj_gislayer AS EVT_OBJECT_GISLAYER
     FROM   r5events e
LEFT OUTER JOIN r5objects ON obj_code = evt_object AND obj_org = evt_object_org
     WHERE  e.evt_routeparent=<param.workordernum>
     AND e.evt_jobtype='MEC'

     
     
    
        
    
    
    
    
    
