I have a way too big query using only SELECT, and I need to filter it using conditional clause WHERE.
Something like this :
if (mycondition)
set @strwhere='conditionalexpression_1'
else
set @strwhere='conditionalexpression_2'
.. then I want to use @strwhere in WHERE, like this :
SELECT col1, col2, col3 ............
from tablex where @strwhere
Does any way to do it ? I have tried but... nothing works fine!