Forum Discussion
thedeeins
Jun 18, 2022Copper Contributor
Parameterizing SQL Query
Hi All, I am trying to implement parameter for my SQL query which will be executed using SQL Server agent Job on a scheduled basis. This parameter which sets the cutoff period (x) in days and job...
Ronen_Ariely
Jun 18, 2022MVP
You ask about query a table which we have no information about and we cannot read minds. Moreover, you try to describe something which a simple sample can be much more clear.
please provide:
1) Queries to CREATE your table(s) including indexes
2) Queries to INSERT sample data.
3) The desired result given the sample, as text or image of excel for example.
4) A short description of the business rules, and how you got 1-2 of the results
5) Which version of SQL Server you are using (this will help to fit the query to your version).
Regards,