LIKE/ILIKE pattern match in sql queries

Hello retool community!

I'm trying to implement a pattern match when searching through my data using textInput fields. (the data source is redshift)

select a from b where a LIKE '%SUBSTRING%'

I'm a little lost how to implement the % part with how retool is configured. As far as I understand when we reference {{textInput1.value}} in the query, the single quotation marks get applied automatically, so I can't wrap my head around how to implement this substring search, unless I use some js transformer?

Try something like

{{ '%' + substring + '%' }}
4 Likes

Omg! it totally makes sense, thank you so much!

1 Like