﻿CREATE procedure [C6MartPeriodico].[GetQueryContratti]
as
	SELECT
		'[' + s.name + '].[' + p.Name + ']' as QueryContratti,
		SchemaName = s.name,
		ProcedureName = p.name,
		s.*
	FROM 
		sys.procedures p
		INNER JOIN sys.schemas s
		ON p.schema_id = s.schema_id
	where (s.name = 'C6MartPeriodico' or s.name = 'C6Mart')
	and p.name like '%GESTIONE_SELECT_PDF_GETDATATHREADS%'
	order by p.name