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)
 Find next and replace function

Author  Topic 

hueby
Posting Yak Master

127 Posts

Posted - 2005-01-25 : 13:50:58
Hi all, what can I use in my SQL DB to act like the "Find next and replace" function?

Is it possible to use a SP with some code that will find all the values of a column and change them to another?

Thanks!

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-01-25 : 13:58:04

Replace function won't do because...??

Go with the flow & have fun! Else fight the flow
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2005-01-25 : 14:07:13
This is not what You are asking for is it ?
update tab set col = 'newvalue' where col = 'oldvalue'

rockmoose
Go to Top of Page

hueby
Posting Yak Master

127 Posts

Posted - 2005-01-25 : 14:08:55
ahhh, yes that is what I am talking about. it's "update" table! got it. thank you.
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2005-01-25 : 14:18:04
You're welcome hueby.

ps. don't forget the where clause when you update...

rockmoose
Go to Top of Page
   

- Advertisement -