     perforations.liner_to              ,
     perforations.liner_perforation_from,
     perforations.liner_perforation_to  ,
-    perforations.who_created, perforations.when_created, perforations.who_updated, perforations.when_updated
+    perforations.who_created,
+    perforations.when_created,
+    coalesce(perforations.who_updated, perforations.who_created),
+    coalesce(perforations.when_updated, perforations.when_created)
   FROM wells.wells_perforations perforations
   INNER JOIN xform_well xform ON perforations.well_id=xform.well_id
   WHERE NOT (liner_from is  null

    xform.well_yield_unit_code              ,
    xform.latitude                          ,
    xform.longitude                         ,
    CASE 
      WHEN xform.latitude is NULL OR
          xform.longitude IS NULL THEN
        NULL
      ELSE  
          ST_SetSRID(ST_MakePoint(longitude, latitude),3005) 
    END AS geom                             ,
    xform.ground_elevation                  ,
    xform.well_orientation                  ,

     create_user, create_date, update_user, update_date, bcgs_id, bcgs_number
    )
    SELECT
     who_created, when_created, coalesce(who_updated, who_created),
     coalesce(when_updated, when_created), bcgs_id, bcgs_number
    FROM WELLS.WELLS_BCGS_NUMBERS
    ORDER BY BCGS_NUMBER;

