I have an issue where I have alot of legacy sql queries with a where clause that is of the form
where systemname in (select systemname from tblsystem)
I now have a directive to expand this to allow for other columns to be added to the where clause, so column names can be dependent on the select statement
something along the lines of
where @columnname in (select columnname from tblsystemfilter)
I'll know the column name and value from the select. Im trying to figure out the best way to move it into the other stored procs where clauses.
there are only 4 new columns where the information can come from and there are alot of procedures to modify. If possible I would like to avoid dynamic sql.
any suggestions on how to approach this?