In this column I was able to only query of the first letters (thanks to a guy from Stackoverflow).
For example:
John Snow after query becomes J S
Lora White after query becomes L W
But I need to replace all remaining letter with *
John Snow should become J*** S***
Jonathan Conan J******* C****
This is the code:
SELECT
Personal info, SUBSTRING([Primary Contact], 1, 1) + ' ' +
SUBSTRING([Primary Contact], CHARINDEX(' ', [Primary Contact]) + 1, 1) AS CI
FROM
xx