0

Is there any way, we could use AND condition in Multiple Select drop down? I mean if the drop down contains 3 values like

  • first_option
  • second_option
  • third_option

I have to do an AND condition. The query we use is

select some_column from table where option in :p_option which does a logical OR, how do I change it to an AND condition? something like

select some_column from table where option =first_option and second_option and so on?? Since the parameters comes from a report, there can be any number of choices coming up. So, how do I do it dynamically?

Niranjan
  • 172
  • 1
  • 5
  • 19
  • I don't understand the question. The column can only have one value, so "... WHERE option = first_option AND option = second_option ..." would never return a row. Could you elaborate or provide and example? – Chris Jan 09 '13 at 08:11
  • Let me explain,this query is used in BI Publisher reporting tool.p_option is a parameter(a drop down menu) which supports multiple select.So more than 1 value is(can be) selected.In my query I want to show results only satisfying all the selected conditions.If a table contains customers and history of their mobile phones,when report viewer selects iphone4 and iphone5 only results where customer has used both these mobiles should appear. – Niranjan Jan 09 '13 at 08:22
  • What database do you use? – Vova Vasiuta Nov 25 '14 at 12:01

0 Answers0