my query is
select
Tbl
.Code as Codefrom
DbName..Tbli cant get encrypted data from Table Tbl
select
Tbl
.Code as Codefrom
DbName..TblKnow the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Guest UserPosted Mar 24, 2011, 12:27 PM
OPEN SYMMETRIC KEY SSN_Key_01
DECRYPTION BY CERTIFICATE HumanResources037;
GO
-- Now list the original ID, the encrypted ID, and the
-- decrypted ciphertext. If the decryption worked, the original
-- and the decrypted ID will match.
SELECT NationalIDNumber, EncryptedNationalID
AS 'Encrypted ID Number',
CONVERT(nvarchar, DecryptByKey(EncryptedNationalID))
AS 'Decrypted ID Number'
FROM HumanResources.Employee;
GO
Suthish NairPosted Mar 24, 2011, 1:19 PM
Why you creating duplicate post. Edit the existing thread only for any changes.
http://www.c-sharpcorner.com/Forums/Thread/114082/select-query-for-encrypted-data-from-another-database.aspx
Guest UserPosted Mar 24, 2011, 12:25 PM
http://msdn.microsoft.com/en-us/library/ms181860.aspx