1
votes

Hi I am trying to use a select query for column BY if I do this I get an error

Unable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered "BY" at line 1, column 124. Was expecting one of: "true" ... "false" ... "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" ... ... ...

this is the part of the code you need to see

=QUERY('Report creator'!A3:BZ3,"Select BY" )

2

2 Answers

2
votes

'By' is a reserved word in query (used in GROUP BY, ORDER BY). Therefore, if used as an identifier you must use backquotes around it.

=QUERY('Report creator'!A3:BZ3,"Select `BY`" )

See here for a description of all reserved words (scroll down).

0
votes

Try selecting the column number rather the Column Identifier