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



    set nocount on
    select dp_depart as storename from mps_depart where dp_code = @storeno


end