`
超级板凳
  • 浏览: 95077 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

ORA-00957: duplicate column name

阅读更多
今天写一个报表的view的时候遇到一个错误:ORA-00957: duplicate column name
意思是重复的列名
我的view如下
create or replace view v_rpt_disb_detail as
select dano,projectid,U.unitid,
       DA.applydate,dtype,DA.status,
       ctno,ctname,ctcg,PJ.count_ccyid,
       DAI.src_amount As apply_amount,
       decode((DAI.Rcv_Amount-DAI.Apply_Amount),0,DAI.Src_Amount,(DAI.rcv_amount / decode(sign(DAI.exrate_apply),1,DAI.exrate_apply,-1,1/-DAI.exrate_apply) * decode(sign(DAI.exrate_src),1,DAI.exrate_src,-1,1/-DAI.exrate_src))) As rcv_amount,
       DAI.Sign_Amount ,DAI.Contractor_Amt,DAI.src_amount,CT.Sign_Amount,
       DAI.Sign_Amount/DAI.Contractor_Amt As proportion,DAI.Exrate_Src,DAI.Exrate_Apply
from DisbursementApplyItem DAI
Left Join DisbursementApply DA
On DAI.daid = DA.DAID
Left Join Appuser U
On DA.applyuser = U.userid
Left Join Contracts CT
On DAI.ctid = CT.ctid
Left Join Project pj
On DA.projectid = PJ.projectid
看了后,我将DAI.src_amount删除,运行一下还是报这个错误,仔细一看原来DAI.Sign_Amount和CT.Sign_Amount的重复加上as取名后就不木有事情了

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics