无法解析 Function QUERY 参数的查询字符串
Unable to parse query string for Function QUERY parameter
正在尝试 运行 这个查询:
=query(IMPORTRANGE("XXXXXXX","'XX'!A:H"), "where Col3 = '666' and select Col1, Col2, Col3, Col4, Col5, Col6, Col7, Col8 and order by Col5 desc",1)
并且不断出现类似这个的奇怪错误
Unable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered " "select" "select "" at line 1, column 24. Was expecting one of: "true" ... "false" ... "not" ... "date" ... "timeofday" ... "datetime" ... "timestamp" ... "min" ... "max" ... "avg" ... "count" ... "sum" ... "no_values" ... "no_format" ... "is" ... "null" ... "year" ... "month" ... "day" ... "hour" ... "minute" ... "second" ... "millisecond" ... "with" ... "contains" ... "starts" ... "ends" ... "matches" ... "like" ... "now" ... "dateDiff" ... "quarter" ... "lower" ... "upper" ... "dayOfWeek" ... "toDate" ... ... <INTEGER_LITERAL> ... <DECIMAL_LITERAL> ... <STRING_LITERAL> ... <QUOTED_ID> ... "(" ... "-" ...
不确定为什么错误指的是第 24 列,我显然没有要求它:)
有什么想法吗?
应该是:
=QUERY(IMPORTRANGE("XXXXXXX", "'XX'!A:H"),
"select Col1,Col2,Col3,Col4,Col5,Col6,Col7,Col8
where Col3 = '666'
order by Col5 desc", 1)
正在尝试 运行 这个查询:
=query(IMPORTRANGE("XXXXXXX","'XX'!A:H"), "where Col3 = '666' and select Col1, Col2, Col3, Col4, Col5, Col6, Col7, Col8 and order by Col5 desc",1)
并且不断出现类似这个的奇怪错误
Unable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered " "select" "select "" at line 1, column 24. Was expecting one of: "true" ... "false" ... "not" ... "date" ... "timeofday" ... "datetime" ... "timestamp" ... "min" ... "max" ... "avg" ... "count" ... "sum" ... "no_values" ... "no_format" ... "is" ... "null" ... "year" ... "month" ... "day" ... "hour" ... "minute" ... "second" ... "millisecond" ... "with" ... "contains" ... "starts" ... "ends" ... "matches" ... "like" ... "now" ... "dateDiff" ... "quarter" ... "lower" ... "upper" ... "dayOfWeek" ... "toDate" ... ... <INTEGER_LITERAL> ... <DECIMAL_LITERAL> ... <STRING_LITERAL> ... <QUOTED_ID> ... "(" ... "-" ...
不确定为什么错误指的是第 24 列,我显然没有要求它:)
有什么想法吗?
应该是:
=QUERY(IMPORTRANGE("XXXXXXX", "'XX'!A:H"),
"select Col1,Col2,Col3,Col4,Col5,Col6,Col7,Col8
where Col3 = '666'
order by Col5 desc", 1)