Hi everyone,
I'm making a SELECT query for my MySQL DB with In() clause like this:
SELECT * FROM mytable
WHERE (col1, col2) IN ( (val1, val2), (val11, val22) );
What I want to do is to use variable values like this:
SELECT * FROM mytable
WHERE (col1, col2) IN ( {{select_distinct_pairs}} );
The {{select_distinct_pairs}} is the result from JSON query like this:
SELECT distinct pair1, pair2 FROM {{table3.data}}
I get error message from MySQL
ER_OPERAND_COLUMNS: Operand should contain 2 column(s)
Apparantly the {{select_distinct_pairs}} is not passed as ('', '') type arrays. And formatDataAsArray doesn't work either.
I believe I cannot make {{select_distinct_pairs}} into string or so since query via Retool is prepared statement.
How could I make this happen?
Thank you in advance.