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 |
|
SQLapprentice
Starting Member
29 Posts |
Posted - 2012-02-15 : 05:41:57
|
| ´++I did a load infile into text column and I need to replace it. It's the first character of text column |
|
|
SQLapprentice
Starting Member
29 Posts |
Posted - 2012-02-15 : 06:05:45
|
| figured it outupdate version SET text = REPLACE(text, substring(texto,1,2),''); |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-15 : 09:23:06
|
quote: Originally posted by SQLapprentice figured it outupdate version SET text = REPLACE(text, substring(texto,1,2),'');
this will replace first 2 characters to '' regardless of whether its ++ or something elseif ++ is only what concerns you just add a filter at least likeupdate version SET text = REPLACE(text, substring(texto,1,2),'')where text like '++%' ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2012-03-17 : 13:54:14
|
| orupdate version SET text = substring(text,3,len(text))where text like '++%'MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|