AS SELECT DISTINCT Variables.VarID FROM Variables   
WHERE upper (Variables.VarName) in (select * from #string_param_temp)

				
				
				