suggestions wrong on temp #table
austrianfoodispuke
Posts: 100
results from table1,table2 into #table
results from here into #table2
select from #table2 t2
t2.<prompt>
is showing values from the very first query (table2)
results from here into #table2
select from #table2 t2
t2.<prompt>
is showing values from the very first query (table2)
Comments
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.