I am new to SQL and i created a query has which has to display a table with many filtering. so I created Query like this one;
*-- input--
select CountryID, COUNT([Document name]) as inputcount ,
MONTH([Creation Date]) AS [Creation Month],Year([Creation Date]) as [Creation Year] INTO TEMP
from dbo.ggg` `
WHERE [doc_type_product_type] not in ('CUST')
and [Document_Source] in ('FAX','Original')
AND ([Monto en Dolares test] > 0 or [Monto en Dolares test] = null)
group by [CountryID],MONTH([Creation Date]) ,Year([Creation Date]) order by [CountryID];*
And every this is fine with this query, but in case new filters show up then i don't have to make alteration to this query or script. So i think there is a way where i can store the filters and pass them to my query and in case of alteration or update i can do it on the table. Any suggestions.