-- Schema: C6MartPeriodico
-- Stored Procedure: ProfiloScaduto_Campione


-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [C6MartPeriodico].[ProfiloScaduto_Campione] 
	-- Add the parameters for the stored procedure here
	
AS
BEGIN

	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
	SELECT c.rete as Rete, c.cod_fiscale as [Codice Fiscale], flag_stampa 
FROM [C6MartPeriodico].[TB_Campione] c
INNER JOIN C6MartPERIODICO.MIFID   m
ON c.cod_fiscale = m.COD_FISCALE 
WHERE m.SCADUTO <> 0
    -- Insert statements for procedure here
	
END

