I have this query
=Query({'Sheet request '!A2:Q;'Sheet sent '!A2:Q},"Select Col1,Col2,Col4,Col3 Where Col1 is not null",1)
How I am going to add this query so that I can have the column 12 from tab "genseat"
=Query({genseat!A2:O},"Select Col12 Where Col1 is not null",1)
Appreciate any help.
Thanks in advance,
12Rev79
CodePudding user response:
Since your first query generates 4 columns, you can only append a second query if you also generate 4 columns.
If you want 3 static columns of data in the second query, you could use something like:
=Query({genseat!A2:O},"Select Col12,'value1','value2','value3' Where Col1 is not null label 'value1' '','value2' '','value3' '' ",1)
Then you can add your queries together using {query1;query2}
and put a third query around them to bring back records that are not null:
query({query1;query2},"where Col1 is not null",1)