How to replace six chracters from middle from any string ??
-
Hi, There is column for mobile number in my table whose data type is string. I have to replace six character from middle with star(*) from the string of 10 characters. For example The Contact number is 9334459875 I have to display it as follows 93******75 first two characters and last two characters only.
-
Hi, There is column for mobile number in my table whose data type is string. I have to replace six character from middle with star(*) from the string of 10 characters. For example The Contact number is 9334459875 I have to display it as follows 93******75 first two characters and last two characters only.
-
Hi, There is column for mobile number in my table whose data type is string. I have to replace six character from middle with star(*) from the string of 10 characters. For example The Contact number is 9334459875 I have to display it as follows 93******75 first two characters and last two characters only.
If SQL Server:
PRINT STUFF( '9334459875' , 3 , 6 , '******' )
-
Hi, There is column for mobile number in my table whose data type is string. I have to replace six character from middle with star(*) from the string of 10 characters. For example The Contact number is 9334459875 I have to display it as follows 93******75 first two characters and last two characters only.
SELECT STUFF('9334459875',3,6,'******')