Several parameters or everything

Discuss the database features
Post Reply
mihmih
Posts: 111
Joined: Wed Feb 18, 2015 9:21 pm

Several parameters or everything

Post by mihmih »

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...


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 )
Unfortunately, this does not work...thanks for the help.
LibreOffice 4.2 on Windows7
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Several parameters or everything

Post by Villeroy »

ORed_Criteria.odb
(13.18 KiB) Downloaded 283 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply