I am using Supermetrics to bring data from mySQL to Google Sheets, but I have a problem. i want the query to have a filter depending on a field. For example, something like where field1='[content of cell A2]'.
How can I do that?
But I am not able to get it working.
select * from tabla where string_field=%RANGE:'Test sheet'!A1%
returns a syntax error.
How can it be done? Thanks a lot
You can't currently use the %RANGE..% syntax directly in the SQL query string. We'll add support for that in the next few weeks and will let you know when it's available.
In the meantime, you can accomplish the same result by modifying the query in the SupermetricsQueries sheet. Go to the SQL column and insert the range reference like this:
Original SQL: SELECT example FROM some_table WHERE field1='content';
Modified SQL: ="SELECT example FROM some_table WHERE field1='"&'Test sheet'!A2&"';"