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

BEGIN
select dp_manager2,dp_mcuid2 from mps_depart where dp_id =  @param1
END