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
 sql query name

Author  Topic 

pnpsql
Posting Yak Master

246 Posts

Posted - 2011-12-11 : 23:52:16
i saw a code in my application's database like :

update abc
set column1 = 'a'
from abc1
where (ad, bc)= (ab,bv);

please help me in where clause, i dont under stand the way.


challenge everything

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-12 : 00:08:54
[code]
update a
set column1 = 'a'
from abc a
join abc1 b
on ad= ab
and bc=bv
[/code]


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

Go to Top of Page

pnpsql
Posting Yak Master

246 Posts

Posted - 2011-12-12 : 22:55:26
please tell me the name of that strategy.

challenge everything
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-13 : 01:24:49
quote:
Originally posted by pnpsql

please tell me the name of that strategy.

challenge everything


its just normal update using join between two tables on relating columns

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

Go to Top of Page

sunnyleoneo
Starting Member

19 Posts

Posted - 2011-12-13 : 02:12:38
Hi,

Check this description for more detail

http://msdn.microsoft.com/en-us/library/aa260662%28v=sql.80%29.aspx
Go to Top of Page
   

- Advertisement -