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

-- 生成时间:2018-11-23 16:44:50 by ebs-core  
CREATE  procedure mps_prd2_modify_0(
     @prdid bigint, 
     @idname varchar(50), 
     @text text ) 
as  
begin  
declare @id3 bigint 
select top 1 @id3 = prd3_id from mps_prd2_0 where prd3_prdid = @prdid  and prd3_idname=@idname 
set @id3 = isnull(@id3, 0) 
if (@id3 = 0) 
begin 
insert into mps_prd2_0(prd3_prdid, prd3_idname, prd3_text) values(@prdid, @idname, @text) 
end else 
begin 
update mps_prd2_0 set prd3_text = @text where prd3_id = @id3 
end 
end