I have a text like following on a database field (SQL Server 2000)
"Led sledding leding led go led"
I want SQL Command to replace the word led to LED, But it shouldn't change words like "sledding" / "leding"
There are 15,000 records with similar text. Need to apply this for all of them.
I have tried following but it takes more than 24 hours. (With in a cursor)
update rprd
set dsc = replace(dsc, 'led ', 'LED ')
where dsc not like 'LED %' collate sql_latin1_general_cp1_cs_as
and dsc like 'led %'
update rprd
set dsc = replace(dsc, ' led ', ' LED ')
where dsc not like '% LED %' collate sql_latin1_general_cp1_cs_as
and dsc like '% led %'
update rprd
set dsc = replace(dsc, ' led', ' LED')
where dsc not like '% LED' collate sql_latin1_general_cp1_cs_as
and dsc like '% led'
Please suggest me a faster and simple way of doing this.