Q: Open an encryption key to create a view I have two sql tables with columns, EncryptedSSN. Normally, I use the following,
OPEN SYMMETRIC KEY SSNKey
DECRYPTION BY CERTIFICATE SSNCertificate; 

SELECT 
    *
FROM 
    Customers
    LEFT JOIN Sales ON 
         CONVERT(VARCHAR, DecryptByKey(Sales.EncryptedSSN)) = CONVERT(VARCHAR, DecryptByKey(Customers.EncryptedSSN))

Problem is, I want to make a view using the same left join as above, but it errors on the Open keyword. Can I get around this? 
