in Education by
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)

1 Answer

0 votes
by
I'm not sure why it doesn't work, but your queries are doing exactly the same thing. Both of them are doing full scan on table so performance will be same. Unfortunately, %% in this case are making performance fix impossible.

Related questions

0 votes
    Let's say I have the following simple table variable: declare @databases table ( DatabaseID int, Name ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 25, 2022 in Education by JackTerrance
0 votes
    I am using SQL Server 2014 and I have the following T-SQL query which pulls data from a View Table: SELECT * from MyView ... '2014-07-01' AND CreatedOn = '2014-07-01' AND CreatedOn...
asked Apr 13, 2022 in Education by JackTerrance
0 votes
    Assymmetric Encryption: Why can a message encrypted with the Public Key only be decrypted with the ... topic in portion Database Programming Techniques of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    How can we filter lines based on content? (a) lines.filter() (b) filter(lines) (c) lines.contains(filter ... & Miscellaneous of Java Select the correct answer from above options...
asked Feb 23, 2022 in Education by JackTerrance
0 votes
    How can we filter lines based on content? (a) lines.filter() (b) filter(lines) (c) lines. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    I'm trying to calculate the MAX value of column D of value E which resets for every A Column. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 2, 2022 in Education by JackTerrance
0 votes
    How do I transfer data from a worksheet to another based on a specific cell value? I tried several ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 22, 2022 in Education by JackTerrance
0 votes
    How do I transfer data from a worksheet to another based on a specific cell value? I tried several ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    Greetings! I have a DropDownList within a FormView which are bound to XmlDataSources: In the page's ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    Greetings! I have a DropDownList within a FormView which are bound to XmlDataSources: In the page's ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    SELECT id, amount FROM report I need amount to be amount if report.type='P' and -amount if report.type='N' ... this to the above query? Select the correct answer from above options...
asked Jan 28, 2022 in Education by JackTerrance
0 votes
    I have a dataframe with 2 columns and I want to add the new column; This new column should be updated based on ... +=1 is not working. Select the correct answer from above options...
asked Jan 11, 2022 in Education by JackTerrance
0 votes
    I have the list of sets like so. I basically want to convert this to the dictionary and to address duplicate keys, ... ] = val return d Select the correct answer from above options...
asked Jan 9, 2022 in Education by JackTerrance
0 votes
    I have this dataframe and trying to select the last n (=2) rows if the present value is True so I code as ... , I should select 50,40 Select the correct answer from above options...
asked Jan 8, 2022 in Education by JackTerrance
0 votes
    Which of the following can be used to select HTML elements based on the value of their name attributes? ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
...