I have a sql query that I will be reusing in multiple stored procedures. The query works against multiple tables and returns an integer value based on 2 variables passed to
One advantage a TVF has has over a view is that you can force whoever calls it to target a specific index.