-- 更新客户头像
UPDATE T_BD_CUSTOMER AA SET FLOGO=(
  SELECT BB.FLOGO FROM T_BD_BIZPARTNER BB WHERE BB.FLOGO IS NOT NULL AND AA.FBIZPARTNERID=BB.FID 
)WHERE EXISTS(SELECT 1 FROM T_BD_BIZPARTNER BB WHERE AA.FBIZPARTNERID=BB.FID);

-- 更新供应商头像
UPDATE T_BD_SUPPLIER AA SET FLOGO=(
  SELECT BB.FLOGO FROM T_BD_BIZPARTNER BB WHERE BB.FLOGO IS NOT NULL AND AA.FBIZPARTNERID=BB.FID 
)WHERE EXISTS(SELECT 1 FROM T_BD_BIZPARTNER BB WHERE AA.FBIZPARTNERID=BB.FID);

