IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[userfunc_732_g_mp_dayutext]') AND type = 'P')
DROP PROCEDURE [dbo].[userfunc_732_g_mp_dayutext]
GO
CREATE PROCEDURE userfunc_732_g_mp_dayutext(@cmpid int,   @branchid int,  @userdpid int,  @useruid int,   @userotid int,  @usersecurity int,@ctgid int,@ctgid2 int,@objid bigint,@param2 varchar(50))
as
begin


set nocount on 
declare @objtype varchar(20)='biz' 
declare @ordid bigint 
set @ordid=@objid 
declare @bizid int 
set @bizid = @ctgid 
declare @nonedate datetime 
set @nonedate = CONVERT(datetime,'1910-1-1')
declare @ord2group2 nvarchar(50) 
set @ord2group2 = '' 
declare @sys_recid bigint 
set @sys_recid = 0 


    select mp_dayutext from ebs_kernel.dbo.pub_messagetemplate where mp_name = @param2



end