Google-sheets – Google Sheets: Extra rows being added by Query

google sheetsgoogle-sheets-query

I have a formula that queries a handful of other pages in the same sheet,

=SORT(
    QUERY(
        {'Design Team Assignments'!B3:G;'Mechanical Team Assignments'!B3:G;'Programming Team Assignments'!B3:G;'Communications Team Assignments'!B3:G;'Media Team Assignments'!B3:G},
        "select Col1,Col2,Col3,Col5,Col6 where Col1 is not null",
        0),
    3, TRUE)

But when I have that formula in the sheet, it adds 732 rows to the sheet for no reason that I can find. Before people ask, I have confirmed that it's the QUERY, because if I delete that cell (or even just the query part of the formula) I can delete the extra rows without them being added back again a half-second later.

I thought that what I was doing with where Col1 is Not Null was to remove the null rows (rows in which Col1 was null), but I guess I was wrong…? Anyone know why this is happening?

Best Answer

The answer, given by Rubén, was to change

where Col1 is Not Null

to

where Col1 <>''

which works perfectly fine.