IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_save_event_indexvalue]') AND type = 'P')
DROP PROCEDURE [dbo].[mps_save_event_indexvalue]
GO
create procedure [dbo].[mps_save_event_indexvalue]
(
@iv_id int ,
@iv_type nvarchar(100) ,
@iv_caption nvarchar(100) ,
@iv_code varchar(50) ,
@iv_value nvarchar(1000) ,
@iv_note nvarchar(2000) ,
@iv_datatype varchar(20) ,
@iv_unit nvarchar(20) 
) as
begin

set nocount on
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

update mps_bizevent_indexvalue set 
@iv_type = case when @iv_type='_none_' then iv_type else @iv_type end  ,
iv_caption = case when @iv_caption='_none_' then iv_caption else @iv_caption end  ,
iv_code = case when @iv_code='_none_' then iv_code else @iv_code end  ,
iv_value = case when @iv_type='_none_' then iv_value else @iv_value end  ,
iv_note = case when @iv_note='_none_' then iv_note else @iv_note end  ,
iv_datatype = case when @iv_datatype='_none_' then iv_datatype else @iv_datatype end  ,
iv_unit = case when @iv_unit='_none_' then iv_unit else @iv_unit end   
where iv_id=@iv_id 

 

set nocount off 
end