﻿CREATE PROCEDURE [dbo].[SP_PDF_DASTORICIZZARE]
AS  
BEGIN
 SELECT IdPdf 
 FROM DocumentiPdf 
 WHERE idStato = 'D' 
	AND idArchivio = 'O' 
	AND DATEDIFF(day,dtCreazione,GETDATE())>180 	   
END