
-- 补充 t_perm_permitem 的 fname
UPDATE t_perm_permitem a SET fname =
(
    SELECT top 1 fname
    FROM t_perm_permitem_l b
    where b.fid = a.fid and b.flocaleid ='zh_CN' and b.fname is not null
)
where (a.fname is null or a.fname = ' ' or trim(a.fname) ='')
and exists (
    SELECT top 1 fname
    FROM t_perm_permitem_l b
    where b.fid = a.fid and b.flocaleid ='zh_CN' and b.fname is not null
);

-- fdescription 为空， 则 fdescription 更新为 fname
update t_perm_permitem set fdescription = fname where fname is not null and (fdescription =' ' or trim(fdescription) ='');

update t_perm_permitem_l set fdescription = fname where fname is not null and (fdescription =' ' or trim(fdescription) ='');



