The condition above doesn’t work in the SQL. How to write it to make it compatible with Retool parser? It’s a regular JS syntax but in retool it doesn’t work.
I think the issue here is we’re getting SQL and JS syntax mixed together. <> is SQL syntax for not equal to, but not valid inside of the {{ }} tags which are all javascript.
What you’re looking for might be:
AND ( {{ !notes.value }} OR )
Passing the results of a {{ }} tag as a string to be read as SQL syntax is only possible if you disable prepared statements in the resource setup, since we want to prevent someone writing DROP table inside of a text input. If you need to pass in a string to be read as SQL, you can disable prepared statements in the resource setup!