Comments
1 comment
-
I've tried this out and, correct me if I've got anything wrong, here's what I did using the Adventureworks database:
SELECT * INTO #table1
FROM Person.Address
JOIN Sales.CustomerAddress ON Person.Address.AddressID = Sales.CustomerAddress.AddressID
SELECT * INTO #table2
FROM #table1
SELECT * FROM #table2 t2
WHERE t2.<prompt>
This then showed me the column options from merging table1 and table2 (Person.Address and Sales.CustomerAddress). Which is what I'd expect. It didn't just prompt with the columns from table2 (Sales.CustomerAddress). As I say, let me know if I've misunderstood you.
Add comment
Please sign in to leave a comment.
results from here into #table2
select from #table2 t2
t2.<prompt>
is showing values from the very first query (table2)