How to write parameterized filter condition in query while fetching data
I have a requirement where I need to pull data from a database and my filter condition should be parameterized and should come from a text/excel file. So that business user can open that text/excel file and can change the condition accordingly.
My query is:
where customerID in (22, 12)
and StateID in (100, 102, 125)
Now in above query how can I store these customerID values & StateID values in text/excel and this query calls those parameters from that file and then execute. In a way it will be dynamic so tomorrow user can go to this file and change the parameter value and without chaning any code the script will still work.