-
Hi Evgeniy! I am wondering what is the right way to arrive at the following SQL (the third line in particular):
If I do something like: Does this make sense? I will come up with a full code sample for this case if necessary. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Doing it via negation is the canonical way of expressing this logic.
SQL seems to compile as needed:
If it's a rare situation in your program it may be OK. Of course in the future we do want to make the negation compile properly. Please let me know if you have further questions. |
Beta Was this translation helpful? Give feedback.
Doing it via negation is the canonical way of expressing this logic.
But that's right, unfortunately, not all queries compile on Trino just yet.
For now we can hack it as follows:
SQL seems to compile as needed:
If it's a rare situation in your program it may be OK. Of course in the future we do want to make the negation compile properly.
Please let me know if you have further questions.