Multiple SELECT CONTAINSTABLE conditionals
I have a SQL code that exceeds the 4000 character limit and I'm trying to split it.
I want to perform 2 o more SELECT CONTAINSTABLE (there may be more) with the second Select being conditional on the first in AND/OR mode.
If the condition is AND and the first Containstable contains results, the second Containstable would be executed. If the first Containstable has no results, the second would not be executed.
If the condition is OR, the second Containstable would be executed even if the first one has no results.
The final result depends on the conditions. If the first Select has results but the second does not, then the AND condition is not met and there are no final results.
If the condition is OR and there are results, there cannot be repeated records.
It is required to be able to order including RANK. I think if multiple Select are used, Rank would not be correct.
I also have the problem that I use synonyms and word inflections and, depending on the words being searched for, with just 1 or 2 words the limit of 4000 for Containstable is exceeded. Also, it seems that the limit for a normal Select is 1024 characters.