0

How can I concatenate a string in a select clause of google sheet query function ?

ex: =QUERY(DATAS!B:F; "SELECT B,C,D,'=image('&E&')',F WHERE upper(F) "&J4&" upper('"&N4&"') LIMIT 50";1)

Here I want to get E column as =image(E) in the sheet.

Anyone with an idea ?

Thanks :d

0

Idea is to wrap your query with another one to get URLs of images and use ARRAYFORMULA(IMAGE()) on output.

={
QUERY(
   QUERY(DATAS!B:F; "SELECT B,C,D,E,F WHERE upper(F) "&J4&" upper('"&N4&"') LIMIT 50";1);
   "SELECT COL1, COL2, COL3"),
ARRAYFORMULA(IMAGE(QUERY(
   QUERY(DATAS!B:F; "SELECT B,C,D,E,F WHERE upper(F) "&J4&" upper('"&N4&"') LIMIT 50";1);
   "SELECT COL4"))),
QUERY(
   QUERY(DATAS!B:F; "SELECT B,C,D,E,F WHERE upper(F) "&J4&" upper('"&N4&"') LIMIT 50";1);
   "SELECT COL1, COL2, COL4")
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.