Closed asasas234 closed 10 months ago
Period是sql关键字, 你用反引号把Period括起来就可以了.
CREATE TABLE t1
(
`a` int,
`b` String
)
ENGINE = Log
CREATE TABLE t2
(
`a` int,
`b` String
)
ENGINE = Log
--成功
select *
from (select a as `Period` from t1) data_alias_Period
INNER JOIN (
SELECT '11' `namea`,
'11' `namec`,
1 `aggregation_weight`) dimension_alias_Period ON
data_alias_Period.`Period` = dimension_alias_Period.namec
--失败
select *
from (select a as Period from t1) data_alias_Period
INNER JOIN (
SELECT '11' `namea`,
'11' `namec`,
1 `aggregation_weight`) dimension_alias_Period ON
data_alias_Period.Period = dimension_alias_Period.namec
下面SQL执行报错,麻烦帮看看,我还挺需要这个项目的。。