I have an ASP.NET Web Application using SQL Server 2008.
When a post code is submitted through the web application, it is encrypted, and then the encrypted value is sent to the database and inserted into a table.
I now need to find a way of querying these post codes from the web application by searching for parts of the post code like:
SELECT PostCode
FROM Table
WHERE PostCode LIKE @PostCode + '%'
How can I do this without storing a decryption function on the database? (Which I believe is bad for security?)