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

CREATE  PROCEDURE CIFOPRTP 
@P_FA_ID CHAR(10)
AS


BEGIN

	SELECT A.SEV_PROC_ID
		,A.SA_ID
		,A.SEV_ARS_DT
		,B.ACCT_ID
		,C.FA_ID 
	FROM CI_SEV_PROC A
		,CI_SA B
		,CI_SEV_EVT_FA C 
	WHERE C.FA_ID = @P_FA_ID 
	AND A.SEV_PROC_ID = C.SEV_PROC_ID 
	AND B.SA_ID = A.SA_ID;

RETURN  				
END 

GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO
