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

-- 生成时间:2018-05-02 17:22:20 by ebs-core  
CREATE  procedure order_78_modify_0(
     @ordid bigint, 
     @idname varchar(50), 
     @text text ) 
as  
begin  
declare @id3 bigint 
select top 1 @id3 = ord3_id from order_78_0 where ord3_ordid = @ordid  and ord3_idname=@idname 
set @id3 = isnull(@id3, 0) 
if (@id3 = 0) 
begin 
insert into order_78_0(ord3_ordid, ord3_idname, ord3_text) values(@ordid, @idname, @text) 
end else 
begin 
update order_78_0 set ord3_text = @text where ord3_id = @id3 
end 
end