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 |
|
jjz
Starting Member
31 Posts |
Posted - 2010-07-22 : 06:56:56
|
| HiI need some assitanceI am trying to get rid of the leading NN/ replacing it with blank, however i am afraid to make use of the replace function, thinking that it will replace the entire field and not just the leading NN/I would like to use this in an update statement.below is what i am trying to achieve:Current:NN/1676NN/1679NN/0292NN/0293NN/0946NN/0702NN/0617NN/0581NN/1855Ideal Results167616790292029309460702061705811855Thank you in advance for your assistance. |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-07-22 : 07:09:28
|
update tableset column=replace(column,'NN/','')where left(column,3) = 'NN/' No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
jjz
Starting Member
31 Posts |
Posted - 2010-07-22 : 07:30:01
|
worked like a charm, thank you for your help. |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-07-22 : 07:30:51
|
welcome No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|
|