I’m using Firebird 2.5 and I have to find rows containing several word in any order:
find ‘blue’ and ‘house’:
‘a blue house in the woods’ = true
‘a house with blue windows’ = true
‘a house by the beach’ = false
‘the blue car’ = true
Using a pipe “|” give me OR and I need AND but in any order, not only with 2 words, could be more
I’m trying using SIMILAR TO but seems that RegExpr in Firebird is too limited.
Using several LIKE x AND LIKE y, is not the way yo go because I don’t know how many words will have to find.
To my knowledge, there isn’t anything built-in to firebird that is going to help you.
What you really need is a full text search. Although this is not directly supported by firebird, there are some useful suggestion here: http://www.firebirdfaq.org/faq328/
Best of luck and sorry I don’t have a more direct answer.