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.
Author |
Topic |
darya
Starting Member
1 Post |
Posted - 2013-09-29 : 14:21:12
|
hi every one, i hope god time I have two tables,1st Table is the Table1, Table which has no,l2p.2nd Table is Table2, Table which has no, DUMi want update Table1 table but that update need DUM in Table2 tableso i write select on Table2 in update on Table1 example flow code:UPDATE Table1 SET l2p= 0.207 * (SELECT DUM FROM Table2 WHERE [no] < 1389) WHERE [no] < 1389 this code is not error but this did not work that select only is working and this update toobut whit both of them update and select do not work |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-09-29 : 16:59:03
|
update like this:update t1 set l2p = 0.207*t2.dumfrom Table1 as t1 inner join Table2 as t2 on t1.no = t2.nowhere t1.[no] < 1389; |
|
|
|
|
|