I have a sql where cluase:
a > 1 and b < 1 and c = 3
In this case I want to remove the a>1, how could I rewrite it to
1 = 1 and b < 1 and c =3
I have try the ExpressionVisitor, but couldn't rewrite the Expression
I have a sql where cluase:
a > 1 and b < 1 and c = 3
In this case I want to remove the a>1, how could I rewrite it to
1 = 1 and b < 1 and c =3
I have try the ExpressionVisitor, but couldn't rewrite the Expression
Copyright © 2021 Jogjafile Inc.
You can simply replace the where part of a SQL by using something like:
but if you want to use the where expression itself and want to find in it the expression a > 1, then you have to use something like
This is not a complete solution since you have to check the right expression as well. Since you are indeed not able to modify the binary expression a > 1 itself you have to look for the enclosing expression and replace it there. So that's the main idea.
By the way this is the output of this little snippet: