Find and Replace in Sqlserver
Posted by
Saranpselvam under
Sql Server on 3/31/2014 1:42:44 AM |
Points: 75 | Views : 1658 | Status :
[Member]
Hi
how to replace only exact matched word in sqlserver.
please look on the image . I tried to replace all 'D' as "Completed" .
select
REPLACE(status,'D','COMPLETED')as status from test
but it replaced all the 'D' in the status column.
but my expectation is i want only replace the word ' D'
The result should be like this
- READY
- FRESH
- READY
- COMPLETED
- COMPLETED
- COMPLETED
Please help me