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 |
|
nirene
Yak Posting Veteran
98 Posts |
Posted - 2008-01-23 : 23:33:35
|
| Hello All, I have a master file withSlcode SldescS0001 Furniture & FittingsS0002 InvestmentsS0003 Coolie & CartageI want to find the ampersand character in between and replace with and.Nirene |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-01-23 : 23:35:46
|
| You like to replace it in sql table or in text file? |
 |
|
|
nirene
Yak Posting Veteran
98 Posts |
Posted - 2008-01-23 : 23:49:33
|
| In the same sql table |
 |
|
|
sunil
Constraint Violating Yak Guru
282 Posts |
Posted - 2008-01-24 : 00:03:02
|
| use REPLACE([columnname],'&','and') likedeclare @table table( nam varchar(30))insert @Tableselect 'sunil & santosh'select Replace(nam,'&','and') [name] from @Table |
 |
|
|
raaj
Posting Yak Master
129 Posts |
Posted - 2008-01-24 : 10:59:41
|
| try this:create table abc (slcode varchar (10), sldesc varchar (50))insert into abc values ('S0001','Furniture & Fittings')insert into abc values ('S0002','Investments')insert into abc values ('S0003','Coolie & Cartage')select * from abcupdate abcset sldesc = replace (sldesc,'&','and')select * from abc |
 |
|
|
|
|
|