Re: Search encrypted column in SQL 2005http://msdn.microsoft.com/w



Brian (Brian@xxxxxxxxxxxxxxxxxxxxxxxxx) writes:
To clarify the search function on CC#, we need to provide a partial or
exact CC# search for our security department to find the suspicious
transaction. We print the last 4 digits of the CC# on the transaction
along with the transaction amount. To identify the CC#, they will need
to perform the CC# search along with the date/time and transaction
amount from our system. We even have FBI came in to investigate
fraudulent credit card activities. This will be the only system that we
can provide them a way to recall the entire card number. For now, it
will be slow to decrypt all this column since we are required to encrypt
them. I will check with Raul's method to see if we can improve the
search for them later.

If the partial search on credit-card number is always on the same digits,
you could stored these in a separate column. Possibly it could here be
acceptable to stored it unencrypted, or at least hashed.


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.