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 2008 Forums
 Transact-SQL (2008)
 update based on source

Author  Topic 

sg2255551
Constraint Violating Yak Guru

274 Posts

Posted - 2012-01-27 : 03:01:38
hi

I have a source table called Source and i have a record 'Avantical'

I need to update 3 records on my destination table called Destination with 3 records to all 'Avantical'

'Avantical Co'
'Avantic Inc'
'Avantically Ltd'

How should i go about it? Thanks a lot and sorry for any convenience caused.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-01-27 : 08:37:25
is it only above three records? or you want any data with Avantical pattern inside it to be changed?


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

Go to Top of Page

sg2255551
Constraint Violating Yak Guru

274 Posts

Posted - 2012-01-27 : 10:56:36
Thanks

Yes, i want andy data with Avantical pattern inside it to be changed.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2012-01-27 : 10:59:30
SET Col = REPLACE(Col,'Avantic','changed to what? You didn''t say')

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page
   

- Advertisement -