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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Copy data from one database table to one other

Author  Topic 

christosds
Starting Member

10 Posts

Posted - 2010-11-18 : 05:55:32
Hello
I have 2 databases PRL & PRL1 in the same SQL server.
Both databases have same structure. Both databases have a table with name MTRL and same columns .
Is it possible to copy data from the PRL database MTRL table WERHS column to PRL2 database MTRL table WERHS column and insert into table the data when the PRL MTRL CODE = PRL2 MTRL CODE.
Any help will be appreciated deeply.
Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-11-18 : 06:49:08
cant you do them together just like


INSERT INTO PRL2.dbo.MTRL
SELECT columns... FROM PRL1.dbo.MTRL


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -