Tuesday, May 20, 2008

Copying records from database into another -- SQL

I had this requirement today where I had to copy from a table in one database into a similar table in another database.

the code I have used in

insert into database1.dbo.table1 select * from database2.dbo.table1 where xxxxx

where xxxx is the criteria that you need to add.

Precautions you have to tak before you do this.

Backup the database into which you are copying the record so that you can restore if something goes wrong.
Copy contents when there are no other transactions being entered into the database1

No comments:

Step By Step Guide to resolve SQL server connection issues when connecting from R Studio

Yesterday I tried using a couple of  RevolveScaleR functions -- RxSqlServerData and RxImport.in Rstudio.  These are my learnings as part of ...