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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 insert values

Author  Topic 

ronin2307
Posting Yak Master

126 Posts

Posted - 2007-02-05 : 17:51:01
I am trying to populate a table with values from another table

insert into TABLE_A
values (select VALUE from DB1.dbo.TABLE_B order by VALUE)


however this doesn't work. Is there an easy way to do something like this?
Thanx

ronin2307
Posting Yak Master

126 Posts

Posted - 2007-02-05 : 17:53:03
never mind. I figured it out.
thanx
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-02-05 : 17:53:37
insert into TABLE_A(columnA, columnB)
select columnA, columnB
from DB1.dbo.TABLE_B
...

Tara Kizer
Go to Top of Page
   

- Advertisement -