• Perhaps if you substitute the stored procedure it runs many times while evaluating the query, but if you put the values into variables, it only runs once? Just a thought...