-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
--[C6Mart].[GESTIONE_S_Intermediari]  'S','GHGRTI63T44L219D'
--[C6MartPeriodico].[GESTIONE_S_Intermediari]  'F','BGLSRG61E30L702A'
CREATE procedure [C6MartPeriodico].[GESTIONE_S_Intermediari] 
	-- Add the parameters for the stored procedure here
	-- Add the parameters for the stored procedure here
	@Rete char(1), 
	@CodiceCliente varchar(16)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SELECT DISTINCT INTERMEDIARIO
	FROM	C6MartPeriodico.PATRIMONIO_TERZI
	WHERE RETE = @Rete
	AND COD_FISCALE = @CodiceCliente
END