-- P5-1679

UPDATE contract_customers AS t_upd
SET (
  "reseller-companyname",
  "reseller-address",
  "reseller-zipcode",
  "reseller-city",
  "reseller-email",
  "reseller-phone"
) = (
  SELECT
    companyname,
    address,
    zipcode,
    city,
    email,
    phone
  FROM contract_customers AS t_sel
  WHERE t_sel.contractcustomerid = t_upd.contractcustomerid
)
WHERE
  dealerstore
  AND "reseller-companyname" IS NULL
  AND "reseller-address" IS NULL
  AND "reseller-zipcode" IS NULL
  AND "reseller-city" IS NULL
  AND "reseller-email" IS NULL
  AND "reseller-phone" IS NULL
;