Escape column name in query (to avoid conflict with reserved words)

后端 未结 2 435
轻奢々
轻奢々 2020-12-12 06:32

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\'\")


        
相关标签:
2条回答
  • 2020-12-12 06:37

    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

    0 讨论(0)
  • 2020-12-12 06:53

    Please try backquotes - eg:

    =query(Data!A:GC, "select `BY` where BG = 'completed'")  
    
    0 讨论(0)
提交回复
热议问题