Comments
3 comments
-
Hi Brien,
I have just tested this scenario on SQL Prompt 9.5.14 (latest), on SSMS 17 and it worked correctly:
-
It's still an issue (I posted about it earlier). If you format (and expand wildcards) :WITH CTE1 AS (
SELECT *, a+b as ab FROM #TempTable), CTE2 AS (
SELECT *, c+d as cd FROM CTE1)
SELECT * FROM CTE2
It becomes:WITH CTE1 AS (SELECT *, a + b AS ab FROM #TempTable),CTE2 AS (SELECT CTE1.ab, c + d AS cd FROM CTE1)SELECT CTE2.ab, CTE2.cd FROM CTE2;
The other * columns from #TempTable aren't returned in the final output -
For more details regarding @Matthew_Sontum 's issue please see https://forum.red-gate.com/discussion/85743/sql-prompt-incorrectly-expanding
Add comment
Please sign in to leave a comment.
SELECT
[a].Field1,
[a].Field2,
[b].AnotherField1,
[b].AnotherField2
INTO
#TempTable
FROM
TableA
LEFT OUTER JOIN TableB ON TableA.Field1 = TableB.AnotherField1
Then you add:
SELECT
tt.*
FROM
#TempTable tt
Then you put your cursor on the * and hit the Tab key you get:
SELECT
[tt].Field1,
[tt].Field2
FROM
#TempTable tt
None of the fields from Table B show up.