IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_customer_modify_0]') AND type = 'P')
DROP PROCEDURE [dbo].[mps_customer_modify_0]
GO


-- 生成时间:2018-04-13 11:31:45 by ebs-core  
CREATE  procedure mps_customer_modify_0(
     @ccid bigint, 
     @idname varchar(50), 
     @text text ) 
as  
begin  
declare @id3 bigint 
select top 1 @id3 = cc3_id from mps_customer_0 where cc3_ccid = @ccid  and cc3_idname=@idname 
set @id3 = isnull(@id3, 0) 
if (@id3 = 0) 
begin 
insert into mps_customer_0(cc3_ccid, cc3_idname, cc3_text) values(@ccid, @idname, @text) 
end else 
begin 
update mps_customer_0 set cc3_text = @text where cc3_id = @id3 
end 
end