2

I have table like

column1       column2      column3
  red         circle         0
  red          line          1
 green        circle         1
 green        circle         0  

What I need is search the database with multiple input string, where as I am not aware of column name,

Suppose if the input is like,

Input1:

green,circle

Result1:

 green        circle         1
 green        circle         0  

Input2:

0,circle

Result2:

  red         circle         0
 green        circle         0 

Input3:

1

Result3:

  red          line          1
 green        circle         1

So basically I need to search the table with multiple combination column items, where as I am not aware of column name. What could be the easiest way?.First I need to find the correct SQL statement to achieve above and then implement in qtsql.

Haris
  • 13,645
  • 12
  • 90
  • 121
  • 1
    at least `input3` is ambiguous, since the number can not be differentiated from the `0` number in `input2`. "`input`" should have a more parseable syntax, i.e. `input3 = ",,1"` – Axel Amthor Aug 31 '15 at 12:07

1 Answers1

4

I don't know how complex is your work, but I would suggest Elastic search for doing the search with unknown column names.

ruveena
  • 1,248
  • 1
  • 10
  • 19