Filtering with multiple independent variables in SQL not working

for using multiple independent variables in SQL query this is what is the 'base' in metabase documentation

but I don't think it is working properly .
please check this.

Could anybody help me fix the issue? is the documentation outdated?

Try changing 'true' to '1=1'
I have all sorts of problems using Postgres and booleans where I don't explicitly set the type.

Hey thanks for the help!.
But unfortunately that's not working

You're not comparing VENDOR to anything. It's trying to cast the string from the VENDOR filter to a boolean and failing.

uhmm. sorry I'm not getting. please use any sample database and create 2 to 3 independent variables in it and share the screenshot if it works .
Thanks for helping!.

The last part of your where clause is wrong. You just have 'AND {{VENDOR}}'. You're not comparing the filter VENDOR to anything.
It should be:

Hello @AndrewMBaines thanks for the help. finally after trying all combinations I came up with the solution.

where true
[[and {{CATE}}]]
[[and {{Ven}}]]

this works with all 4 cases.

  1. no filter
  2. only category filter
  3. only vendor filter
  4. both category and vendor filter.

this works with as many variables as you wish to include in the Query.