Retool Workflow SQL Queries with Where Clauses Failing

,



I am facing issues with retool workflows where every single workflow where I have a SQL query with a Where clause is failing.

Hello @Tushar_Nair,

Try wrapping the double brackets in quotes.

ANY('{{companyFetchQueryData.data}}'::int[])

Same for the other queries.

Let me know if this helps!

Thank you @GuilhermeSilva that does fix it but I am trying to understand what changed? I have 10s of worklfows including the ones in the screenshots that were working just fine without the double bracket quotes.

1 Like

It depends on the DB type and set up, some examples of ' ' being needed are when prepared statements are turned on on sql or when using snowlake or other DB languages as it is SQL but a variation of it.
Even in apps doing a simple query like the following sometimes requires brackets: select * from user where id = '{{currentUser.id}}'