a guest Feb 20th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- OPEN SYMMETRIC KEY NameOfSymmetricKey
- DECRYPTION BY CERTIFICATE NameOfCertificate;
- Select EncryptDOB, ISNULL(CONVERT(VARCHAR (MAX),DecryptByKeyAutoCert (cert_ID('NameOfCertificate'), NULL, EncryptDOB)),'1900-01-01') As 'DateOfBirth'
- from TableName
- CLOSE SYMMETRIC KEY NameOfSymmetricKey;
RAW Paste Data