IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[order_43_dolinkdata_1192]') AND type = 'P')
DROP PROCEDURE [dbo].[order_43_dolinkdata_1192]
GO
create procedure order_43_dolinkdata_1192(
@cmpid int ,
@useruid int ,
@bizid int ,
@ordbcid int,
@ordid bigint,
@ftype varchar(10),
@fbizid int,
@fordid bigint,
@ford2tag int ,
@ford2id bigint,
@rtype varchar(10),
@rbizid int,
@rordid bigint,
@rord2tag int ,
@rord2id bigint 
) 
as 
begin



if (@ftype='biz' and @fbizid=40 and @ford2tag=0) 
update old set  old.ord_zzzb=new.ord_szzx1 ,  old.ord_xcdj=new.ord_xcdj1 ,  old.ord_zhij=new.ord_zj1 ,  old.ord_xzdj=new.ord_xzdj1 ,  old.ord_rzbm=new.ord_szbm1 ,  old.ord_rztx=new.ord_ydhtx ,  old.ord_zw=new.ord_zw1
from order_43 new ,order_40 old 
where  new.ord_id=@ordid 
 and old.ord_id=new.ord_fordid

end