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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Sql Update

Author  Topic 

vk18
Posting Yak Master

146 Posts

Posted - 2006-10-11 : 19:39:58
Hello Friends,

I have two tables called tblnum and tblcal. there are different dates in the tblnum. I need to update num1,num2,num3 fields in tblnum
from tblcal based on tblnum date. can some one help me with Update Query I am using SqlServer2000
Thx

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-10-11 : 20:03:09
Here's an example UPDATE with a JOIN:

UPDATE t1
SET Column1 = t2.Column1, Column2 = t2.Column2
FROM Table1 t1
INNER JOIN Table2 t2
ON t1.SomeColumn = t2.SomeColumn

Tara Kizer
Go to Top of Page
   

- Advertisement -