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 |
|
tkotey
Yak Posting Veteran
75 Posts |
Posted - 2008-07-02 : 11:24:15
|
| I would like to copy data from one table to another. What is the sql statement for it. This is NOT meant to be a backup. I would like to do this periodically. Please help.Thanks |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-07-02 : 11:45:18
|
| Insert into target_table(column_list)Select column_list from source_tableMadhivananFailing to plan is Planning to fail |
 |
|
|
tkotey
Yak Posting Veteran
75 Posts |
Posted - 2008-07-03 : 03:14:10
|
quote: Originally posted by madhivanan Insert into target_table(column_list)Select column_list from source_tableMadhivananFailing to plan is Planning to fail
Thanks Madhivanan. This is what I used and it workedSET IDENTITY_INSERT target_table ONInsert into target_table(column_list)Select column_list from source_table |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-07-03 : 03:27:29
|
quote: Originally posted by tkotey
quote: Originally posted by madhivanan Insert into target_table(column_list)Select column_list from source_tableMadhivananFailing to plan is Planning to fail
Thanks Madhivanan. This is what I used and it workedSET IDENTITY_INSERT target_table ONInsert into target_table(column_list)Select column_list from source_table
remember to set it back to off once you have copied data onto table. |
 |
|
|
|
|
|