Microsoft says "Reference the resulting table multiple times in the same statement" http://msdn.microsoft.com/en-us/library/ms190766.aspx
However, this is always true whenever you are referencing a table,since the alias will be different. What you gain is when the cte is more complicated code (joins, group by's etc) then you have to write the code only once and refer to the cte name with multiple alias'.
No comments:
Post a Comment