-- =============================================
-- Description:	<La sp legge i dati dalla tb C6MartPeriodico.FOI80>
-- =============================================
-- [C6MartPeriodico].[PL_MP_S137BIS_FOI80] 'F','QRCRLR38P10G999N'
CREATE procedure [C6MartPeriodico].[PL_MP_S137BIS_FOI80]
	---- 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 
	 DTTRIM,
	 DTRIFE,
	 RETE,
	 CODFIS,
	 DESPROD,
	 CODMAN,
	 CODCONF,
	 CODPROD,
	 SUBPROD,
	 ISIN,
	 CTV,
	 PREZZO,
	 QUOTE,
	 PREZZOMAX,
	 DTPREZZOMAX,
	 DESMAX,
	 PREZZOPROT,
	 CTRVIMPPROT,
	 DESPROT,
	 DESPRODTIT,
	 QUOTA_MAX_PERC
	FROM C6MartPeriodico.FOI80
	WHERE 1=1
	  AND RETE = @Rete 
	  AND CODFIS = @CodiceFiscale 
END