-- ******************************************************************
-- *
-- * 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 = 'CIFOPRTC' AND type = 'P')
   DROP PROCEDURE CIFOPRTC 
GO

CREATE PROCEDURE CIFOPRTC
@P_LANGUAGE_CD CHAR(3),
@P_PREM_ID CHAR(10)

AS

   DECLARE   @V_LANGUAGE_CD 	CHAR(3);
   DECLARE   @V_RETURN_CD   	int;


   SELECT @V_LANGUAGE_CD = 'ENG' 
   SELECT @V_RETURN_CD = 0
	


BEGIN
    

	SELECT A.PREM_ID
		,A.GEO_TYPE_CD
		,A.GEO_VAL
		,C.DESCR GEO_TYPE_DESCR
	FROM CI_PREM_GEO A, CI_GEO_TYPE B, CI_GEO_TYPE_L C
	WHERE A.PREM_ID = @P_PREM_ID
	AND B.GEO_TYPE_CD = A.GEO_TYPE_CD
	AND C.GEO_TYPE_CD = B.GEO_TYPE_CD
	AND C.LANGUAGE_CD = @P_LANGUAGE_CD;


RETURN
END 

GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO


