-- 导入模版，模版名称为空，从多语言表取一条记录插入

update T_BAS_IMPORTTEMPLATE t1 set fname = (SELECT TOP 1 fname FROM T_BAS_IMPORTTEMPLATE_L t2 WHERE t2.fid = t1.fid and t2.fname <> '' and t2.fname <> ' ')
where exists (select 1 from T_BAS_IMPORTTEMPLATE_L where fid = t1.fid) and (t1.fname = '' or t1.fname = ' ');

