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 |
chbala85
Starting Member
49 Posts |
Posted - 2013-10-14 : 01:52:20
|
hi all,i have a table like belowpatientid code11 101.312 102..313 103.14 104..3.15 109.316 105..3but need like below to remove . (dot)patientid code11 101.312 102.313 10314 104.315 109.316 105.3please help me.Thanks,Krishn. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-10-14 : 01:59:23
|
use replace UPDATE tableSET code = REPLACE(code,'..','.') ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
 |
|
chbala85
Starting Member
49 Posts |
Posted - 2013-10-14 : 02:16:11
|
Thanks for replay.i need to remove last . (dot) also 104..3.thanks,krish |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-10-14 : 04:57:53
|
[code]UPDATE tableSET code = STUFF(Code,LEN(Code),1,'')WHERE RIGHT(Code,1) = '.'[/code]------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
 |
|
|
|
|