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
 Update tables in different

Author  Topic 

Vassily Zaitsev
Starting Member

13 Posts

Posted - 2012-06-18 : 07:20:22
Hello everyone, I am new in SQL Server world, and I doubt with a hard
I have already created a query and it must be done through an "UPDATE"
I need to "UPDATE" Field "SEQUENCIA" table "TITMMOVCOMPL" according to the field "NUMEROMOV" table "TMOV."
in a table I can do "UPDATE" with ease, but tables are different and so I do not know to create the "UPDATE"
Someone help me please
do not know if I was clear in the question.
thank you
Regards to all.

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2012-06-18 : 07:25:51
update TITMMOVCOMPL
set SEQUENCIA = t2.NUMEROMOV
from TITMMOVCOMPL t1
join TMOV t2
on t1.colt1 = t2.colt2

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Vassily Zaitsev
Starting Member

13 Posts

Posted - 2012-06-18 : 08:14:41
What is t1 and t2?
not understand the syntax
I am running on Excel.
Go to Top of Page
   

- Advertisement -