IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_g_messagetemplate]') AND type = 'P')
DROP PROCEDURE [dbo].[mps_g_messagetemplate]
GO
CREATE procedure [dbo].[mps_g_messagetemplate]
@cmpid int
AS
BEGIN
SET NOCOUNT ON;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
select * from  ebs_kernel.dbo.pub_messagetemplate with(nolock)  where mp_cmpid=@cmpid order by mp_id
exec [mps_gen_messagetemplate_selectableapp] @cmpid,'gzh'
exec [mps_gen_messagetemplate_selectableapp] @cmpid,'qyh'
exec [mps_gen_messagetemplate_selectableapp] @cmpid,'ding'
exec [mps_gen_messagetemplate_selectableapp] @cmpid,'dayu'
set nocount off
END