Solved

Why does this keep coming up NULL?

Posted on 2016-08-24
2
56 Views
Last Modified: 2016-08-24
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
Comment
Question by:brucegust
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 35

Accepted Solution

by:
YZlat earned 500 total points
ID: 41768876
DecryptByKey must be returning null or empty string
0
 

Author Comment

by:brucegust
ID: 41768925
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question