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.
| Author |
Topic |
|
andrew.vint
Starting Member
2 Posts |
Posted - 2006-05-15 : 12:49:29
|
| Hi,I am going through the process of upsizing an old Access Database to an SQL database. However as with these things i have a few queries that dont work.What i am trying to do is copy the contents of one table and append it to the end of another. I try to use the following SQL statement but it does not work stating the table (destination) already exists.INSERT * INTO TableB FROM TableAI am sure this is simple to those that know, but i would really appreciate any help on this.Thanks in advanceAndrew Vint |
|
|
RyanRandall
Master Smack Fu Yak Hacker
1074 Posts |
Posted - 2006-05-15 : 12:58:22
|
Here's a working example for you...declare @TableA table (a int, b int)insert @TableA select 1, 2declare @TableB table (a int, b int)insert @TableB select 3, 4union all select 5, 6insert into @TableA select a, b from @TableBselect * from @TableA Ryan Randallwww.monsoonmalabar.com London-based IT consultancy Solutions are easy. Understanding the problem, now, that's the hard part. |
 |
|
|
|
|
|