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)
 Import data to table2 from table1

Author  Topic 

rum23
Yak Posting Veteran

77 Posts

Posted - 2008-11-07 : 10:38:29

table1 has fields fd1, fd2, fd3, fd4, fd5.
table2 has fields fd1, fd2.

I want to import the data from table1 to table2 for the fields fd1 and fd2. How can I do this sql query?

This will be a one time data import.

Thanks much.

Vinnie881
Master Smack Fu Yak Hacker

1231 Posts

Posted - 2008-11-07 : 10:39:22
insert into Table2(Fd1,Fd2)
select a.fd1,a.fd2
from
Table1 a


Success is 10% Intelligence, 70% Determination, and 22% Stupidity.
\_/ _/ _/\_/ _/\_/ _/ _/- 881
Go to Top of Page
   

- Advertisement -