• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 86
  • Last Modified:

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?
0
brucegust
Asked:
brucegust
1 Solution
 
YZlatCommented:
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

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now