4>
5> DECLARE @BankAccountNumber char(14)
6> SET @BankAccountNumber = '1111-1111-1111'
7> SELECT 'XXXX-' + SUBSTRING(@BankAccountNumber, 6,4) + '-XXXX' Masked_BankAccountNumber
8> GO
Masked_BankAccountNumber
------------------------
XXXX-1111-XXXX
(1 rows affected)
1>