>
Through i recognise the place of CTE's , I really hate to use them, and would avoid them whenever possible. One of the problems is that it is not an ANSI standard and often there is a better (readable and maintainable) alternative.>
>Interesting. I really like CTEs and I think that, in many instances, replacing derived tables with them makes the code much more readable and maintainable.
Several years ago, I did a quick poll on a newsgroup and asked 20 developers that very question. The results were 10 liking it, 10 not. :)
(Yes, I know that's not scientific, so not looking for anyone to get out the "anecdote does not equal information" flag)
I thought T-SQL for five years and sometimes used CTEs as a way to introduce the concept of derived table subqueries to people who hadn't been exposed to them.