Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 create a table from query results

Author  Topic 

armesjr
Starting Member

9 Posts

Posted - 2009-11-30 : 10:59:24
i did an inner join on a view and a table, and i want to create a new table from these results. how do i do this

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-11-30 : 11:00:48
[code]select.... into yournewtable from.....[/code]
Go to Top of Page

armesjr
Starting Member

9 Posts

Posted - 2009-11-30 : 11:15:40
Due to my inner join i have two columns that repeat themselves, so i fill like this is why i cant create a table.
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-11-30 : 12:02:43
alias one (or both) of them
SELECT t1.id as id1, t2.id as id2 into yournewtable from t1 inner join t2...
Go to Top of Page
   

- Advertisement -