前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >解决:Error while compiling statement: FAILED: SemanticException [Error 10007]: Ambiguous column refere

解决:Error while compiling statement: FAILED: SemanticException [Error 10007]: Ambiguous column refere

作者头像
微风-- 轻许--
发布2020-04-30 17:03:57
7.4K0
发布2020-04-30 17:03:57
举报
文章被收录于专栏:java 微风java 微风

1.报错:

代码语言:javascript
复制
Error while compiling statement: FAILED: SemanticException [Error 10007]: Ambiguous column reference creationtime in bcpt

2. sql如下:

代码语言:javascript
复制
insert overwrite table z_w_clean.di_tets_e_type
  SELECT cont_pr_code,
         plurt_code,
         elec_e_code,
         cont_price_name,
         pre,
         creadate,
         ste,
         creationtime,
         ornizeid,
         cont_free,
         is_frlevy,
         bace_limit,
         creationtime,
         creorid,
         null,
         liicatiotime,
         lasmoerid,
         null
    FROM (SELECT contce_code,
                 plusort_coe,
                 eleype_code,
                 contrice_name,
                 pice,
                 cte_date,
                 sate,
                 fr_type,
                 orgzeid,
                 con_free,
                 iee_levy,
                 ballimit,
                 From_unixtime(Unix_timestamp(creationtime)) AS creationtime,
                 crearid,
                 null,
                 From_unixtime(Unix_timestamp(lastmontime)) AS lastationtime,
                 lastmoid,
                 null,
                 Row_number() OVER(partition BY contece_code ORDER BY ontime DESC) AS num
            FROM s_wter.buients_prce_pe) bbb
   WHERE bbb.num = 1;

3.报错原因:有重复定义的列: creationtime , 改名解决 。

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-04-23 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档