February 20, 2009 at 1:32 am
Hi Please help
I am having dificulties with decryption as I'm trying to find staff who had increases between 200812 and 200901. So I write this query and I'm not getting any results
OPEN Symmetric Key HRSecureSymmetricKey
DECRYPTION By PASSWORD = '**********';
SELECT ALLSTAFF.EmplID
, CAST(CONVERT(VARCHAR(50), DecryptByKey(ALLSTAFF.TotalPack)) AS Float) AS TotalPack
, CAST(CONVERT(VARCHAR(50), DecryptByKey(ALLSTAFF_1.TotalPack)) AS Float) AS AfterIncrease
, Period_Post.PostPeriod
FROM ALLSTAFF INNER JOIN
Period_Post ON ALLSTAFF.Period = Period_Post.Period INNER JOIN
ALLSTAFF AS ALLSTAFF_1 ON Period_Post.PostPeriod = ALLSTAFF_1.Period AND ALLSTAFF.EmplID = ALLSTAFF_1.EmplID
Where ALLStaff.Period = 200812
AND CAST(CONVERT(VARCHAR(50), DecryptByKey(ALLSTAFF.TotalPack)) AS Float) <> CAST(CONVERT(VARCHAR(50), DecryptByKey(ALLSTAFF_1.TotalPack)) AS Float)
Please Help
February 20, 2009 at 7:35 am
Is it possible that getting no data is the correct result?
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
February 24, 2009 at 12:12 am
Actually the reason I was getting no results was because of the data. Data for priod 200812 was not encrypted properly and as a result could not be decrypted for use.
I then deleted that data and reimported it, encrypted then ran my query again and it now working fine.
Thanks for the feedback
February 24, 2009 at 6:09 am
Thanks for letting us know what the resolution was.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply