Q:

Functions vs complex joins in SQL

Is it a good practice to use make functions (both scaler and table valued) over using complex joins with multiple tables again and again. 
For instance
Case 1:
SELECT 
*
FROM table1 t1
INNER JOIN table2 t2 ON t1.ID=t2.ID
INNER JOIN table2 t3 ON t2.ID=t3.ID
INNER JOIN table2 t4 ON t3.ID=t4.ID
INNER JOIN table2 t5 ON t4.ID=t5.ID
INNER JOIN table2 t6 ON t5.ID=t6.ID
INNER JOIN table2 t7 ON t6.ID=t7.ID

CASE 2
SELECT *
FROM table1 t1
INNER JOIN udf_myFunc() udf ON udf.ID=t1.ID

Are there cases where one method has definite advantages?

A:

I have to vote against the function direction. If for no other reason, it obfuscates intent. In addition, while it may save a bit of work if you reuse it, that is the only likely benefit, as it is not going to increase the performance. 
I like functions when you have to massage a particular piece of data, but to use one to avoid joins is a nasty way to handle things.

