标签:过程 代码 时空
set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go ALTER procedure [dbo].[fr_spkfkxp] @spid char(11) as if @spid<>‘‘ begin if not exists(select 1 from spkfk where spid = @spid) begin insert into spkfk SELECT [spid],[spbh],[sptm],[spmch],[zjm],[beactive],[yishj],[is_gdsj],[is_gdzk],[is_tjsp],[is_hysp],[is_gmp],[is_gsp],[is_sy],[is_yp] ,[jingd],[denglrq],[gengxshj],[delrq],[dw],[shpchd],[shpgg],[kemuhao],[oldcode],[rkhw],[ckhw],[bzqfs],[fenlbh],[guojbh],[changjbh],[huaxm] ,[changym],[suming],[xiwname],[tongym],[shengccj],[pizhwh],[zhucsb],[jixing],[shiyzh],[bulfy],[chuczysx],[chuffl],[yaofpd] ,[yongfyyl],[jinjzh],[zhuysx],[yaowchf],[youxq],[shangplx],[guizbz],[yongyfl],[leibie],[jlgg],[otd],[ordercycle],[stkquot] ,[shlv],[hshjj],[jj],[shj],[hshsj],[lshj],[koul],[kcsx],[kcxx],[helkc],[bzqts],[yujts],[zgshl],[zhdcbj],[zdshj],[zgshj],[zgjjxz] ,[maolv],[huiytj],[itemlength],[itemheight],[itemwidth],[weight],[casevolume],[caseweight],[zuixdwtj],[zuixdwzl],[pfpj],[dispcolor] ,[jx],[bzgg],[lastmodifytime],[is_cmd],[lsgg],[is_zdyh],[is_jkyp],[minshl],[cx_dj_kl],[is_cx_dj],[zdyh],[zdhyzklshj],[is_cyhydz] ,[huiyshl],[nocalcopys],[fuzr],[is_jsh],[is_lc],[is_zhongyao],[type_bh],[zdlshj],[guanjzjh],[shiyq],[abbrImageURL],[cbflbh],[imageUrl] ,[is_ybsp],[yb_zfbl],[yb_spbh],[username],[chuchj],[pifj],[zhilbz],[chargelb],[is_sendybzx],[tj_ylshj],[is_hj],[is_yxbz],[wdid] ,[chbjs],[dwbh],[zengp],[beizhu],[abc],[代税价],[biaozhu],[cdzjm],[chdzjm],[huowlb],[qdchbdj],[zhongbiao],[biaoshi],[biaoj] ,[hszdxj],[khdj],[xjwsj],[xjhsj],[cdwsj],[cdhsj],[cxpz] FROM [ksoa].[dbo].[spkfk] where spid=@spid update spkfk set hshjj=0,jj=0,kcsx=0,kcxx=0,zhdcbj=0,代税价=0,qdchbdj=0,biaoj=0,khdj=0,xjwsj=0,xjhsj=0,cdwsj=0,cdhsj=0 where spid=@spid insert into spkfjc (spid) select spid from spkfk where spid=@spid end if not exists(select 1 from hwsp where spid =@spid and hw = ‘HWI00000002‘) begin insert hwsp(spid,hw) values(@spid,‘HWI00000002‘) end end
标签:过程 代码 时空
原文地址:http://bks2015.blog.51cto.com/9847303/1612947