I have the following simplified query which should filter the decrypted column values
SELECT ResourceId, ClientId, UserName
FROM dbo.Resources
WHERE DecrpytByKey(UserName) LIKE '%PETER%';
It doesn't work and returns me 0 results
If I use
SELECT K.ResourceId, K.ClientId, K.DUserName
FROM (
SELECT ResourceId, ClientId, UserName, DecrpytByKey(UserName) AS DUserName
FROM dbo.Resources
) AS K
WHERE K.DUserName LIKE '%PETER%'
This works correctly and gives me the desired results.
I want to go with something similar to option #1, since I want it to be efficient and filter the results before the join.
Is there a way to filter based on the decrypted value in the same select statement?
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)