Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
How do I restore a table from *.bak file?While at the subject how do I copy data from one table to another within same database?any help appreciated?
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts
Posted - 2007-01-03 : 23:48:17
I don't think you can restore single table from the backup. You have to restore entire backup.To copy data from one table to another, do either of the following:1.
Select * into destfrom sourcetblwhere 1=0Insert into dest(col1, col2, ...)select col1, col2, ...
Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED"
Kristen
Test
22859 Posts
Posted - 2007-01-04 : 02:30:24
"How do I restore a table from *.bak file?"You will have to restore the BAK to a new, temporary, database; "copy" the table from the temporary database to the "live" database; then drop the temporary database.Kristen