I'm using IMPORTRANGE() in Google Sheets to get some data from another spreadsheet. Authentication is done and it looks like everything is working fine. It WAS working fine till now and I have no clue what's going on.
When I only use the IMPORTRANGE, the output is as I expected it to be. I have a list of "Plot numbers", which are mainly numeric but can have additions like -a or -1c. (Examples: 1234, 1234-a, 1234-1a). These numbers have some status-info, it's just text. When imported, I see the correct list I expected (I left out some other columns that are in the imported range but the content doesn't really matter):
+---------+--------+
| Col1 | Col2 |
+---------+--------+
| Status1 | 3701-L |
| Status2 | 3302-G |
| Status1 | 3769 |
| Status2 | 3156 |
| Status1 | 3515 |
| Status2 | 3301-C |
+---------+--------+
However, when I'm using the QUERY() function with the dataset from IMPORTRANGE(), some of those "plot numbers" disappear, while keeping the status values (and other column data values) just fine (again, some columns left out but I do need 'em, they work just fine):
=QUERY(IMPORTRANGE("url"; "Data!A4:Y"); "SELECT Col2, Col1")
with the output:
+------+---------+
| Col1 | Col2 |
+------+---------+
| | Status1 |
| | Status2 |
| 3769 | Status1 |
| 3156 | Status2 |
| 3515 | Status1 |
| | Status2 |
+------+---------+
As you see, the non-numeric values are empty (or null?) but the correct status is still there (along with the other data that I left out). I can't control the source data in any way, but is there something I can do to just let this work? I guess it has something to do with the way QUERY handles "multiple data types", but in this case I want it to be treated as text..