Question : Inserting from a different database

I am in the middle of testing some sql server restore scenarios. What I did was deleted about 10 rows from a database table. I then created a new "temporary" database  by restoring to a point in time just before I deleted the records.

So I can see the records I deleted now in the temporary db. Question becomes what is the best query to write to take the 10 rows I deleted and put them back in the first db. Remember the query needs to essentially "cross" databases.

I know I could generate a script in sql server to do it, but normally this for all of the data in the table. I just need 10 rows so if theres a better way to do it if anybody has suggestions it would be greatly appreciated.

Jason

Answer : Inserting from a different database

By the way, come to think of it, SQL management studio have a very easy tool to copy between databases, if you want to copy the whole recordset. Leftclick the destination database, select "Tasks" -> "Import Data...". In the wizard, select the second database as source, and select the table you need to copy to and from, and just watch it copy the data you need.
Random Solutions  
 
programming4us programming4us