-- ******************************************************************
-- *
-- * Copyright (c) 2000, 2007, Oracle. All rights reserved.
-- *
-- ******************************************************************

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO



IF EXISTS (SELECT name FROM sysobjects 
         WHERE name = 'CIFOPRTK' AND type = 'P')
   DROP PROCEDURE CIFOPRTK
GO

CREATE PROCEDURE CIFOPRTK
@P_LANGUAGE_CD CHAR(3),
@P_SP_ID CHAR(10)

AS

BEGIN

	SELECT A.SP_ID
		,A.GEO_TYPE_CD
		,A.GEO_VAL
		,C.DESCR GEO_TYPE_DESCR
	FROM CI_SP_GEO A
		,CI_GEO_TYPE B
		,CI_GEO_TYPE_L C
	WHERE A.SP_ID = @P_SP_ID
	AND B.GEO_TYPE_CD = A.GEO_TYPE_CD
	AND C.GEO_TYPE_CD = A.GEO_TYPE_CD
	AND C.LANGUAGE_CD = @P_LANGUAGE_CD;

RETURN
END 

GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO
