t sql – Dynamic Masking Not Masking as Expected


I have a table named dbo.Employee with a dynamic mask set up on both the first and last name fields, using a partial mask. The mask is created such that both fields display the first and last two characters then ‘X’s in between. This is working as expected.

I have a view named dbo.vwEmployee which references the dbo.Employee table. When this view is queried, the first and last name fields are returned as expected (masked properly).

I have another view (dbo.vwSiteView), which joins (left join) the dbo.vwEmployee (employee) view. This view returns the employee last and first name values fully masked, not partially masked. This is not what I would expect. I don’t have a full mask defined on any field in any table, so I don’t know why dbo.vwSiteView is returning the employee names fully masked instead of partially.