Several parameters or everything
Posted: Sat Jan 12, 2019 5:43 pm
Hello,
I would like to have 4 fields in the form, where I will choose parameters, i.e. companies. I want to do it so that I can display data from several companies at the same time, which is why I have the parameters in "IN". The problem is that if all parameters = NULL, then I would like all companies. I do not know how to do this...
Unfortunately, this does not work...thanks for the help.
I would like to have 4 fields in the form, where I will choose parameters, i.e. companies. I want to do it so that I can display data from several companies at the same time, which is why I have the parameters in "IN". The problem is that if all parameters = NULL, then I would like all companies. I do not know how to do this...
Code: Select all
`parameter_column` IN
(CASE WHEN :a IS NULL AND :b IS NULL AND :c IS NULL AND :e IS NULL AND :f IS NULL THEN (SELECT ID FROM `parameter_column_table` ) ELSE (SELECT :a, :b, :c, :e, :f) END )