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
 add an entire table to another (no replace)

Author  Topic 

eadward
Starting Member

6 Posts

Posted - 2006-05-16 : 04:50:51
Hi! I've some data in a table, and I want to add these records to another table, but I tried yet with select ... Into ... and I lose all the data from this one. I need to ADD the data from table to table. Any suggestion?
Thx

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2006-05-16 : 04:52:10
insert into tableA(fields...)
select fields... from tableB

--------------------
keeping it simple...
Go to Top of Page

eadward
Starting Member

6 Posts

Posted - 2006-05-16 : 04:56:58
:D THX, it works now! :D
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-05-17 : 03:39:41
Also make sure that the columns of the two tables are identical in datatype

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -