-- =============================================
-- Author:		<Mohammed, Ebid>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
--  [C6MartPeriodico].[PL_S43LineaSelfBF]  'F','GSTGPL59P03B586G'
CREATE procedure [C6MartPeriodico].[PL_S43LineaSelfBF_20181214_PreMioFoglio] 
	@Rete char(1), 
	@CodiceFiscale varchar(16)
AS
BEGIN
	SELECT  	 	 
		 codconf as NumContratto,
		 isnull(ctv,0) as Controvalore,
--INIZIO Intervento Eligo Titoli		 
		 NomeProdotto as NomeProdotto,
--FINE   Intervento Eligo Titoli		 		 
		 dbo.ToShortDateString(cast(datasott as varchar))  as DataSott
	FROM       
		C6MartPeriodico.ANAG_SELF LS	
	WHERE 
		LS.rete= @Rete
		AND LS.codfis= @CodiceFiscale
		AND isnull(ctv,0) < 0
END