我想保留字段名:Country,Cal_Year和Cal_Month。但是,如果我尝试运行代码,则代码将无法运行,如下面的示例代码所示。 错误状态:'国家/地区'不是有效的字段名称。
LOAD [Country Code],
[ISO code],
Currency,
ApplyMap('Currency_Map',Currency, 'Currency Unmapped') as Country,
Quotation,
year as Cal_Year,
trim(mid(period, 3,4)) as Cal_Month,
Balance,
Activity,
(Balance/Quotation) as FX_Rate,
Country & Cal_Year & Cal_Month as Key1 <-supposedly an erroneous statement
答案 0 :(得分:1)
你缺少逗号吗?
(Balance/Quotation) as FX_Rate, <-- missing comma here
Country & Cal_Year & Cal_Month as Key1
答案 1 :(得分:1)
另外,这样做只能引用原始数据表,而不是结果。所以你需要
Country & Cal_Year & Cal_Month as Key1
成为
ApplyMap('Currency_Map',Currency, 'Currency Unmapped')
& year
& trim(mid(period, 3,4)) as Key
在添加逗号后也能正常工作