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

CREATE proc [dbo].[mps_update_worktime]
@wt_id int,
@wt_time1 varchar(5),
@wt_time2 varchar(5)
as
begin
update mps_worktime
set wt_time1 = case when @wt_time1='_none' then wt_time1 else @wt_time1 end ,
wt_time2 = case when @wt_time2='_none' then wt_time2 else @wt_time2 end 
where wt_id=@wt_id
end