I am making a function in Microsoft SQL Server. I want to set a variable to the results of an SQL with the function input being applied as a filter. I can\'t find the right synt