﻿-- =============================================
-- Author:		<Federica Cianfa__INTERVENTO-MODIFICA>
-- Create date: <19/11/2014, Pomezia>
-- Description:	<La sp legge i dati dalla tb C6MartPeriodico.CAPPROT>
-- =============================================
-- [C6MartPeriodico].[PL_MP_S137BISCapitaleProtetto] 'F','QRCRLR38P10G999N'
CREATE procedure [C6MartPeriodico].[PL_MP_S137BISCapitaleProtetto]
	---- Add the parameters for the stored procedure here
	@Rete char(1), 
	@CodiceFiscale varchar(16)
AS
BEGIN  
  --SELECT  top 1		 
  --        'Interfund Capital Protection' AS DES_PROD,
  --        '001234.RS.S678' AS COD_CONF,
  --        '120,1040' AS QUOTA,
  --        '100,1234' AS NUMEROQUOTE,
  --        '12.025,22' AS CONTROVALORE,
  --        '31/03/2014' AS DATARIF,
  --        'Quota massima' AS DES_MAX,
  --        '125,4573' AS QUOTA_MAX, 
  --        '80' AS QUOTA_MAX_PERC,           
  --        '31/03/2013' AS DATARIF_MAX,
  --        'Quota e controvalore protetti*' AS DES_PROT,
  --        '100,3658' AS QUOTA_PROT,
  --        '100,1234' AS NUMEROQUOTE_PROT,
  --        '10.048,97' AS CONTROVALORE_PROT         
     SELECT 
	 DES_PROD
	,COD_CONF
	,QUOTA
	,NUMEROQUOTE
	,CONTROVALORE
	,DATARIF
	,DES_MAX
	,QUOTA_MAX
	,QUOTA_MAX_PERC
	,DATARIF_MAX
	,DES_PROT
	,QUOTA_PROT
	,NUMEROQUOTE_PROT
	,CONTROVALORE_PROT 
	,DES_PROD_TIT -- Aggiunta per E-FOI80
	FROM C6MartPeriodico.CAPPROT
	WHERE 1=1
	  AND RETE = @Rete 
	  AND CODFIS = @CodiceFiscale 
END