             WHEN 'Y' THEN TRUE
             WHEN 'N' THEN FALSE
         END                               ,
-        casings.when_created, casings.when_updated, casings.who_created, casings.who_updated
+        casings.when_created,
+        coalesce(casings.when_updated, casings.when_created),
+        casings.who_created,
+        coalesce(casings.who_updated, casings.who_created)
     FROM wells.wells_casings casings
     INNER JOIN xform_well xform ON xform.well_id=casings.well_id;
 

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


    perforations.liner_to              ,
    perforations.liner_perforation_from,
    perforations.liner_perforation_to  ,
    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
