Forgive me if this isn't the correct forum to post this question.. i'm VERY new to SAS and still learning new things everyday. My question is: I need to do column level decryption with SaS. Here is the setup. SQL Server 2016: -- SYMMETRIC KEY has been created with AES_256 bit for the database. -- This table has been created. The FooPassB will hold the encrypted data. CREATE TABLE Foo ( FooId INT IDENTITY(1,1) PRIMARY KEY, FooPassN NVARCHAR(25), FooPassB VARBINARY(MAX) NULL, LoadDate DATETIME DEFAULT(GETDATE()) ); --In SQL I would add data to this table like this: OPEN SYMMETRIC KEY CERT_KEY DECRYPTION BY CERTIFICATE Cert; GO INSERT INTO Foo (FooPassN, FooPassB) VALUES ('1234', ENCRYPTBYKEY(KEY_GUID('CERT_KEY'), N'1234')), ('5678', ENCRYPTBYKEY(KEY_GUID('CERT_KEY'), N'5678')) CLOSE SYMMETRIC KEY CERT_KEY; Now here is my issue... how do I decrypt that data in sas? In SQL I would: OPEN SYMMETRIC KEY CERT_KEY DECRYPTION BY CERTIFICATE Cert; GO SELECT FooPassN, FooPassB, CONVERT(NVARCHAR(25), DECRYPTBYKEY(FooPassB)) AS 'Decrypted Foo' FROM DBO.Foo CLOSE SYMMETRIC KEY CERT_KEY; But I don't think I can wrap that SQL statement in a SaS statement. Does SaS have a way to send that whole command? or do I have to create a API or a Sproc that SaS can connect to and pull data from that instead? Cheers and thanks for any insight on this!
... View more