Author |
Topic |
immad
Posting Yak Master
230 Posts |
Posted - 2015-04-08 : 05:27:11
|
hi,my data is like thisSalesPersonaw.ab99811abb.iaaa111ai want data looks like thisSalesPersonawababbiaaaai want to remove numbers and dot through querythanks for the helpimmad uddin ahmed |
|
satheesh
Posting Yak Master
152 Posts |
Posted - 2015-05-06 : 10:02:39
|
Try this select REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE('aw.ab998','1',''),'2',''),'3',''),'4',''),'5',''),'6',''),'7',''),'8',''),'9',''),'0',''),'!',''),'@',''),'#',''),'$',''),'%',''), '^',''),'&',''),'*',''),' ',''),'.','') |
|
|
akibintel
Starting Member
7 Posts |
Posted - 2015-06-15 : 06:17:46
|
Create Function [dbo].[RemoveNonAlphaCharacters](@Temp VarChar(1000))Returns VarChar(1000)ASBegin Declare @KeepValues as varchar(50) Set @KeepValues = '%[^a-z]%' While PatIndex(@KeepValues, @Temp) > 0 Set @Temp = Stuff(@Temp, PatIndex(@KeepValues, @Temp), 1, '') Return @TempEndThanks & Regards |
|
|
|
|
|