问题
I have a Google Sheets and want to query in a column called BY
. This is failing:
=query(Data!A:GC, "select BY where BG = 'completed'")
How can I escape that BY
column name?
回答1:
Please try backquotes - eg:
=query(Data!A:GC, "select `BY` where BG = 'completed'")
回答2:
so to use the column BY as an identifier you must use backquotes around it...
`BY`
CREDIT: JAMES @ https://productforums.google.com/forum/#!msg/docs/tFB_02gNceQ/-2IUvmnQBgAJ
来源:https://stackoverflow.com/questions/28048788/escape-column-name-in-query-to-avoid-conflict-with-reserved-words