Tutorials & Examples Web-help Blog

Add an auto filter in the query editor


#1

It looks simple to me but maybe harder to implement. Today you can filter on a field with a constant value, a list, a parameter. Would it be possible to simply filter with another field of the same table ? At least with the “equal” symbol.

Like for Table A you have field A1 and A2. You could filter like A1 = A2.
It’s a very common need. Of course you can filter like this AFTER the import but it’s always better to filter on the database in order to reduce the memory consumption. The goal is to improve the query filter. I know it’s still possible to type SQL but in my case, i’d rather use the query editor.


#2

Did you try using the SQL expressions? You can create an calculated field “Condition” using expressions such as

CASE
  WHEN [A] = [B] THEN 1 ELSE 0
END

and then use a filter where “Condition” is 1.


#3

Oh i did not see this fx in the condition :slight_smile: Well it may not have the same execution plan but at least it’s a way to do it thanks !