DECLARE @PhoneNo varchar(10), @Mask varchar(10)
SELECT @PhoneNo = '1234567890', @Mask = 'XXXXXXXXXX'
SELECT @PhoneNo as 'Phone No', replace(@PhoneNo, substring(@PhoneNo, 1, len(@PhoneNo) - 3),
substring(@Mask, 1, len(@PhoneNo) - 3)) as 'MaskedPhoneNumber'
I have a total experience of around 5 years out of which 4 years in MS technologies. I have a passion towards coding.