begin
if(select cdxm from inserted)='借款金额'
begin
insert into cd
select projectid,marketid,convert(int,marketyear)+convert(int,zq),
'应还金额',cdje,0 from inserted
end
end
begin
insert into cd
select projectid,marketid,convert(int,marketyear)+convert(int,zq),
'应还金额',cdje,0 from inserted where cdxm='借款金额' and projectid>0
end