?
Solved

Why does this keep coming up NULL?

Posted on 2016-08-24
2
Medium Priority
?
70 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 2000 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

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

801 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