-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE procedure [C6MartPeriodico].[GESTIONE_SELECT_ZIP_DA_INVIARE]
@FKIDElaborazioneZip int
AS
BEGIN
	SELECT
--		Rete,
--		CodiceFiscale,
		id IdZip
		,NomeFile
--		,
--		TipoReport,
--		DataGenerazione,
--		DataInvio,
--		FlagInvio,
--		NomeFile SELECT *
	FROM
		[C6MartPeriodico].GESTIONE_ZIP_FTP
	WHERE
		FlagInvio = 'N'
		AND DateCopyToSend IS NOT NULL
		AND FKIDElaborazioneZip = @FKIDElaborazioneZip
END