码迷,mamicode.com
首页 > 其他好文 > 详细

【瑞星系统】修改会员积分处理导入会员资料

时间:2014-08-19 12:19:24      阅读:265      评论:0      收藏:0      [点我收藏+]

标签:os   io   ar   cti   ad   on   sp   res   

----
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


Create Procedure vipinsert(@RETURN bit output)
AS
BEGIN

BEGIN TRANSACTION
insert into basvip(vipno,vipname,sex,tel,idcard,PROP,REGION,ADDRESS,POSTCODE,ISSUEPSN,RECPSN)
select vipno,name,case when sex=‘男‘ then 1 else 0 end ,tel,cert,‘1‘,‘1‘,‘1‘,‘1‘,‘1‘,‘1‘
from dts_vip where vipno not in (select vipno from basvip)

COMMIT TRANSACTION

SELECT @RETURN = 1
END

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

----
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


CREATE PROCEDURE DBO.DTSPREPARE_vip(@T_TAB VARCHAR(20))
AS
BEGIN
IF @T_TAB = ‘DTS_vip‘
BEGIN
IF EXISTS (SELECT 1 FROM DBO.SYSOBJECTS WHERE NAME = ‘DTS_vip‘ AND XTYPE = ‘U‘)
DROP TABLE DBO.DTS_vip

CREATE TABLE [dts_vip] (
[name] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
[vipno] [numeric](15, 0) NULL ,
[sex] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
[cert] [numeric](20, 0) NULL ,
[tel] [numeric](15, 0) NULL
) ON [PRIMARY]

END
ELSE
BEGIN
RAISERROR(‘无此临时表‘, 16, 1) WITH SETERROR
RETURN
END
END


GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

 

【瑞星系统】修改会员积分处理导入会员资料,布布扣,bubuko.com

【瑞星系统】修改会员积分处理导入会员资料

标签:os   io   ar   cti   ad   on   sp   res   

原文地址:http://www.cnblogs.com/nlg3413/p/3921502.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!