ALTER FUNCTION [dbo].[CBKT_GetOrgInOrgWide]
	(@org_id varchar(20), 
	@ref_date varchar(20))
	--@landscape varchar(3))
RETURNS @result TABLE (
	org_id varchar(20), 
	org_name varchar(250), 
	org_level varchar(20),
	parent_org_id varchar(20),
	parent_org_name varchar(250),
	parent_org_level varchar(20),
	org_id_00 varchar(20), 
	org_name_00 varchar(250), 
	org_id_01 varchar(20), 
	org_name_01 varchar(250), 
	org_id_02 varchar(20), 
	org_name_02 varchar(250), 
	org_id_03 varchar(20), 
	org_name_03 varchar(250), 
	org_id_04 varchar(20), 
	org_name_04 varchar(250), 
	org_id_05 varchar(20), 
	org_name_05 varchar(250), 
	org_id_06 varchar(20), 
	org_name_06 varchar(250), 
	org_id_07 varchar(20), 
	org_name_07 varchar(250), 
	org_id_08 varchar(20), 
	org_name_08 varchar(250),
	org_id_09 varchar(20), 
	org_name_09 varchar(250),
	org_id_10 varchar(20), 
	org_name_10 varchar(250),
	org_id_11 varchar(20), 
	org_name_11 varchar(250),
	org_id_12 varchar(20), 
	org_name_12 varchar(250)
	)
/*
SELECT * FROM dbo.GetOrgInOrg('00009004','20110101','','100', 1, 1)
*/
BEGIN

	INSERT INTO @result
	SELECT * FROM dbo.CBKT_GetOrgInOrgWideDetail(@org_id,@ref_date,1,'','',
	'','',
	'','',
	'','',
	'','',
	'','',
	'','',
	'','',
	'','',
	'',''
	,'',''
	,'',''
	,'',''
	,'',''
	)

	RETURN
END




