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 |
sycophill
Starting Member
2 Posts |
Posted - 2007-04-04 : 07:15:45
|
Hi,This will be first of many posts! I'm still very new to SQL!I have a 'People' table that contains an 'Email' column (nvarchar), there are a couple of thousand values within this column that contain 'xxx.xxx.@romeike.com', which I would like to change to 'xxx.xxx.@cision.com'.I've tried...UPDATE PeopleSET Email = REPLACE ('@romeike.com','romeike','cision')UPDATE PeopleSET Email = REPLACE ('%@romeike.com','romeike','cision')(few other variations)...but this results in every value in 'Email' being replaced with 'cision'! Can someone please point out what I'm doing wrong? I've found some info about UPDATE .WRITE on MSDN but it doesn't give a good example.. is it even applicable?Many thanks for your time!Phill |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-04-04 : 07:19:00
|
UPDATE PeopleSET Email = REPLACE (Email,'@romeike.com','@cision.com')MadhivananFailing to plan is Planning to fail |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-04-04 : 07:25:20
|
.WRITE extension in SQL 2005 is applicable only for blob columns like TEXT/NTEXT/IMAGE.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
sycophill
Starting Member
2 Posts |
Posted - 2007-04-04 : 07:30:05
|
quote: Originally posted by madhivanan UPDATE PeopleSET Email = REPLACE (Email,'@romeike.com','@cision.com')MadhivananFailing to plan is Planning to fail
Madhivanan, thank you! I'm glad I was on the right path, it gives me some hope! |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-04-04 : 09:02:50
|
Madhivanan, Why don't you add those links to your signature so people can have easy access to them! Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
|
|
|
|
|