【问题标题】:How to run query to only pull data if specified column contains values如果指定列包含值,如何运行查询以仅提取数据
【发布时间】:2019-09-14 21:46:22
【问题描述】:

如果指定的工作表在第 3 列中包含任何值,则数据表上的查询只应提取数据。如果第 3 列中没有值,则查询中不应出现任何数据。

我尝试输入“CONTAINS VALUE”,但没有成功。

https://docs.google.com/spreadsheets/d/1CMcxSP86Zc8FajecJmVwlgfe3ComQXUQYpfssjbcyBY/edit?usp=sharing

我收到一条错误消息

=QUERY({'Alex English'!A3:AF;'Zack Jones'!A3:AF;'Aaron Schafer'!A3:AF; 'Abigail Myer'!A3:AF;'Andrew Megronigle'!A3:AF;'April Baker'!A3:AF;'Cameron Staley'!A3:AF;Blank2!A3:AF;'Christin Pylant'!A3:AF;'Chris Burgos'!A3:AF;'Cody Sullivan'!A3:AF;'Colin Pomet'!A3:AF;'Daniel Probst'!A3:AF;Blank!A3:AF;'David Smith'!A3:AF;'Destini Walker'!A3:AF;'George Flores'!A3:AF;'James Murphy'!A3:AF;'Jennifer Piatt'!A3:AF;'Jesse Camire'!A3:AF;'Joel Endel'!A3:AF;'Jordan Richardson'!A3:AF;'Josh Gionti'!A3:AF;'Josh Mech'!A3:AF;'Juan Ortiz'!A3:AF;'Justin Kopka'!A3:AF;'Justin Sanders'!A3:AF;'Kaitlyn Beatty'!A3:AF;'Kevin Lora'!A3:AF;'Kyle Fallon'!A3:AF;'Kyle Silverstein'!A3:AF;'Matthew Nussbaum'!A3:AF;'McKenna Benz'!A3:AF;'Michelle Bullard'!A3:AF;'Michelle Marcos'!A3:AF;'Oliver Santry'!A3:AF;'Ruben Loyo'!A3:AF;'Ryan DelFavero'!A3:AF;'Ryan Kennedy'!A3:AF;'Ryan Morgenlander'!A3:AF;'Shawn Ramrup'!A3:AF;'Tara Knothe'!A3:AF;'Todd Worthington'!A3:AF;'Wesley Miller'!A3:AF;'Zach Coldiron'!A3:AF},
 "select Col1,Col2,Col3,Col4,Col5,Col6,Col7,Col8,Col9,Col10,Col11,Col12,Col13,Col22 
  where Col3 CONTAINS VALUE", 1)

【问题讨论】:

    标签: google-sheets google-sheets-formula google-sheets-query google-query-language


    【解决方案1】:

    你需要的是:is not null

    =QUERY({'Alex English'!A3:AF;'Zack Jones'!A3:AF;'Aaron Schafer'!A3:AF; 'Abigail Myer'!A3:AF;'Andrew Megronigle'!A3:AF;'April Baker'!A3:AF;'Cameron Staley'!A3:AF;Blank2!A3:AF;'Christin Pylant'!A3:AF;'Chris Burgos'!A3:AF;'Cody Sullivan'!A3:AF;'Colin Pomet'!A3:AF;'Daniel Probst'!A3:AF;Blank!A3:AF;'David Smith'!A3:AF;'Destini Walker'!A3:AF;'George Flores'!A3:AF;'James Murphy'!A3:AF;'Jennifer Piatt'!A3:AF;'Jesse Camire'!A3:AF;'Joel Endel'!A3:AF;'Jordan Richardson'!A3:AF;'Josh Gionti'!A3:AF;'Josh Mech'!A3:AF;'Juan Ortiz'!A3:AF;'Justin Kopka'!A3:AF;'Justin Sanders'!A3:AF;'Kaitlyn Beatty'!A3:AF;'Kevin Lora'!A3:AF;'Kyle Fallon'!A3:AF;'Kyle Silverstein'!A3:AF;'Matthew Nussbaum'!A3:AF;'McKenna Benz'!A3:AF;'Michelle Bullard'!A3:AF;'Michelle Marcos'!A3:AF;'Oliver Santry'!A3:AF;'Ruben Loyo'!A3:AF;'Ryan DelFavero'!A3:AF;'Ryan Kennedy'!A3:AF;'Ryan Morgenlander'!A3:AF;'Shawn Ramrup'!A3:AF;'Tara Knothe'!A3:AF;'Todd Worthington'!A3:AF;'Wesley Miller'!A3:AF;'Zach Coldiron'!A3:AF},
     "select Col1,Col2,Col3,Col4,Col5,Col6,Col7,Col8,Col9,Col10,Col11,Col12,Col13,Col22 
      where Col3 is not null", 1)
    

    【讨论】:

      猜你喜欢
      • 2020-12-25
      • 2019-08-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-30
      相关资源
      最近更新 更多