Reply to Re: Trigger to encrypt field before write
Posted by rcamarda on 04/28/06 22:10
more research I have:
CREATE TRIGGER F_Student_SSN.eSSN
ON ds_v6_staging.F_STUDENT_SSN
update, insert
AS
update f_student_ssn
set essn = cast(EncryptByAsymKey(AsymKey_ID('Student_aKey'),
cast(eSSN as nvarchar(11))) as nvarchar(40))