IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_g_wrk_time]') AND type = 'P')
DROP PROCEDURE [dbo].[mps_g_wrk_time]
GO
CREATE procedure [dbo].[mps_g_wrk_time] 
@wrkid int 
as
begin
set nocount on
select * from mps_flowwork_worktime where wt_wrkid=@wrkid 
select * from mps_extsqljs where cd_objid=@wrkid and cd_objid2=0 and cd_name='wrk.time' 
set nocount off
end