I'm not sure if it's intentional or an oversight, but I've just started using SQL Complete Express Edition 2.50.86 and the auto-completion doesn't include CTE tables defined in the query you're writing.
Code: Select all
; WITH Some_CTE
AS (SELECT 1 AS Something)
SELECT *
FROM Some_CTE
As you type the FROM So... line, it doesn't include the Some_CTE table as an option in auto-complete.
You can also do self-referential CTE's like:
Code: Select all
; WITH Some_CTE
AS (SELECT 1 AS Something
UNION ALL
SELECT *
FROM Some_CTE)
SELECT *
FROM Some_CTE
Where it should auto-complete the FROM Some_CTE after the first UNION, and it doesn't.