Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Retrieving encrypted data.

Author  Topic 

DaveWarren
Starting Member

1 Post

Posted - 2009-07-06 : 04:36:56
Hi all

Is it possible to store and retrieve encrypted data from an INT column? I've managed to encrypt the data going in, but I can't seem to get it back out again!

Using
convert(varchar(150), decryptbykey([EncryptedInt], 0, null)) as decryptedInt,

I get "Argument data type int is invalid for argument 1 of DecryptByKey function."

Do I need to change the column to a binary or nvarchar?

THanks for help

Dave

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-07-18 : 16:28:50
What does Books Online say?



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page
   

- Advertisement -