|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
问题如下
SELECT *, '02' as Div FROM `\\secc347\Season 1\sec02`.[Season 1$B8:AA176] where [Season 1$B8:AA176].dept >0 union all
SELECT *, '02' as Div FROM `\\secc347\Season 1\sec06`.[Season 1$B8:AA176] where [Season 1$B8:AA176].dept >0 union all
SELECT *, '02' as Div FROM `\\secc347\Season 1\sec08`.[Season 1$B8:AA176] where [Season 1$B8:AA176].dept >0 union all
SELECT *, '02' as Div FROM `\\secc347\Season 1\sec11`.[Season 1$B8:AA176] where [Season 1$B8:AA176].dept >0
是我用做database的query, 现在我需要过滤些信息, 条件是表里的field [country]="china*" or "Korea*"
想这样写
select * from (SELECT *, '02' as Div FROM `\\secc347\Season 1\sec02`.[Season 1$B8:AA176] where [Season 1$B8:AA176].dept >0 union all
SELECT *, '02' as Div FROM `\\secc347\Season 1\sec06`.[Season 1$B8:AA176] where [Season 1$B8:AA176].dept >0 union all
SELECT *, '02' as Div FROM `\\secc347\Season 1\sec08`.[Season 1$B8:AA176] where [Season 1$B8:AA176].dept >0 union all
SELECT *, '02' as Div FROM `\\secc347\Season 1\sec11`.[Season 1$B8:AA176] where [Season 1$B8:AA176].dept >0) where country="china*" or "country ="korea*"
Excel报错. 我猜想是缺少这个union query做为表的名字, 因为不加where条件是可以用的.
请教这个应该怎么改? |
|