Query API Selecting where two columns are equal

John Smith asked on August 10, 2017 18:10


Is it possible to write a query where two fields are the same such as SELECT * FROM [TABLE] WHERE [Field1] = [Field2] I see we can call .WhereEquals(leftside, rightside) but how can I tell the system to use another column instead of a static value?

Thank you,

Correct Answer

Trevor Fayas answered on August 10, 2017 18:20

you can use the normal "Where(string)" method on the object query to write that out, the where equals assumes you are passing a value

1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.