Hi,
I want to have a query that displays in a table on retool, I want to be able to search certain fields but only if a value has been entered into the search box.
So I want it to by default have SELECT * FROM TABLE where date filed = todays date, I want it to only add an AND clause if the text input has a none null value.
So it becomes SELECT * FROM TABLE WHERE datefield = todays date AND field_name like (textInput1.value)
In pseudo code I want to so be
SELECT * FROM TABLE WHERE date_field = todays date
(IF input value is not null) {
AND name_field = input value
}
How do I do that from inside the query?
Thanks.