Here's my SELECT:
select Patient.AccountID, Patient.PracticePatientID as PracticeAccountID,
RIGHT(' ' + CONVERT(varchar(100), DecryptByKey(Patient.hSSN)) ,4) as SSN,
from Patient (nolock)
Here are the results I get:
You'll notice that everything under SSN is NULL.
Thing is, I've got data in those fields, as you can see here:
Why do I get a NULL value for every attempt to decrypt the values in the hSSN field?