Why does this keep coming up NULL?

Here's my SELECT:

select Patient.AccountID, Patient.PracticePatientID as PracticeAccountID,
    RIGHT('    ' + CONVERT(varchar(100), DecryptByKey(Patient.hSSN)) ,4) as SSN,
    Patient.PatientDOB, Patient.PatientID
    from Patient (nolock)

Open in new window


Here are the results I get:

results
You'll notice that everything under SSN is NULL.

Thing is, I've got data in those fields, as you can see here:

SSNs
Why do I get a NULL value for every attempt to decrypt the values in the hSSN field?
brucegustPHP DeveloperAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
YZlatConnect With a Mentor Commented:
DecryptByKey must be returning null or empty string
0
 
brucegustPHP DeveloperAuthor Commented:
And my DBA counterpart just confirmed that. The good news is that I found a different resource that gives me what I'm needing, so I'm gold!

Rock on!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.