-- Stored procedure
-- =============================================
-- Author:		Simone D'Elia
-- Create date: Aprile 2022
-- Description: 
-- =============================================
-- [C6MartPeriodico].[PL_S172PreferenzeESG] 'S', 'VNZGPL53M04L781P'
create procedure [C6Mart].[PL_FD181PreferenzeESG_bkp_20240911]
 -- Add the parameters for the stored procedure here
 @Rete char(1), 
 @CodiceFiscale varchar(16)
AS
BEGIN
SELECT [rete]
      ,[cod_fiscale]
      ,[Preferenza_esg_cliente]
      ,[ESG_E]
      ,[ESG_S]
      ,[ESG_G]
      ,[obiettivo_ESG_minimo]
      ,[ESG_Rating]
      ,[ESG_E_perc]
      ,[ESG_S_perc]
      ,[ESG_G_perc]
  FROM [C6StampeCentralizzate].[C6Mart].[BrsClienteESG] esg
WHERE 1 = 1
	AND esg.RETE = @Rete
	AND esg.COD_FISCALE = @CodiceFiscale
END