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

CREATE  PROCEDURE  CIFOPRTB
@P_LANGUAGE_CD CHAR(3),
@P_PER_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.PER_ID
		,A.SEQ_NUM
		,A.PHONE_TYPE_CD
		,A.COUNTRY_CODE
		,A.PHONE
		,A.EXTENSION
		,B.DESCR
	FROM CI_PER_PHONE A, CI_PHONE_TYPE_L B
	WHERE A.PER_ID = @P_PER_ID
	AND B.PHONE_TYPE_CD = A.PHONE_TYPE_CD
	AND B.LANGUAGE_CD = @P_LANGUAGE_CD
	ORDER BY A.SEQ_NUM;

RETURN
END 

GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO
