修改添加存储过程

create PROCEDURE [dbo].[up_AccountItemEdit]

@AccountGuid uniqueidentifier,

@AccountCategory varchar(50),

@AccountName varchar(50),

@AccountFSCode varchar(50),

@DICGuid uniqueidentifier,

@IsObsoleted bit

AS

IF(EXISTS(SELECT 1 FROM T_AccountItem trm WHERE trm.AccountGuid=@AccountGuid))

BEGIN UPDATE T_AccountItem SET AccountCategory=@AccountCategory, AccountName=@AccountName, AccountFSCode=@AccountFSCode, DICGuid=@DICGuid, IsObsoleted=@IsObsoleted WHERE AccountGuid=@AccountGuid END

ELSE

BEGIN INSERT INTO T_AccountItem ( AccountGuid, AccountCategory, AccountName, AccountFSCode, DICGuid, IsObsoleted ) VALUES ( @AccountGuid, @AccountCategory, @AccountName, @AccountFSCode, @DICGuid, @IsObsoleted ) END

posted @ 2012-12-06 14:33  717806198  阅读(171)  评论(0编辑  收藏  举报