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 |
|
berndh
Starting Member
6 Posts |
Posted - 2006-01-03 : 06:14:16
|
| Hi all,I need to write an SQL statement to update multiple row (all) as follws and can just not get it right please help.I have two fileds - "Tilte" and "Title1" in my "notes" table.I would like to run through the entire table and replace the information in "Title1" with that of "Title", also I need to change a character whilst doing so , ie change a "=" to a "-"ExampleTitle - "Will is coming to town = Paul" need to copy this to Title1 and it must change to...Title1 - "Will is coming to town - Paul"Running MS SQL2000 SP4Help appriciatedThanks |
|
|
shallu1_gupta
Constraint Violating Yak Guru
394 Posts |
Posted - 2006-01-03 : 06:26:18
|
| this will help youupdate notes set title1 = replace(title,'=','-') |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-01-03 : 06:46:01
|
| If it is only for display you can useSelect replace(title,'=','-') as title from notesMadhivananFailing to plan is Planning to fail |
 |
|
|
berndh
Starting Member
6 Posts |
Posted - 2006-01-03 : 08:14:27
|
| Thanks guys. Working. |
 |
|
|
|
|
|