产品基本信息中产品分类字段为单值代码,后增加字段直接存储产品分类名称
merge into T_JSSP_JBXX A
using (select C_PID,C_CODE,C_NAME from T_CODE) B
on (trim(A.C_CPFL)=trim(B.C_CODE)
and trim(B.C_PID)='30000010')
when matched then
update set A.C_CPFLMC=A.C_CPFL||'-'||B.C_NAME
when not matched then
update set A.C_CPFLMC=A.C_CPFL
结果