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
 updating table

Author  Topic 

jere1972
Starting Member

2 Posts

Posted - 2007-01-19 : 23:04:41
need some help, I want to replace 422 entries in 2 columes of a table with date from 2 columes of a table from a different data base
example replace the data lname colume of customer table from the test database, using data from the last_name colume of the address table from the stores database

I have limited knowledge on sql scripts
thanks for any help

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-01-20 : 00:29:09
something like this


update t
set col1 = t2.cola,
col2 = t2.colb
from db1.dbo.table1 t1 inner join db2.dbo.table2 t2
on t1.somecol = t2.somecol



KH

Go to Top of Page
   

- Advertisement -