sql oracle中的标识符无效

时间:2014-02-28 04:07:47

标签: sql oracle

我是oracle sql的初学者。我的脚本中有错误。我不知道出了什么问题。我检查一切可能导致错误的事情。请帮帮我..

这是脚本:

insert into antifraud(case_number,monitored_date,trigger1,trigger2,contract_number,description)
select a.col1 as case_number, a.col2 as monitored_date
  ,a.col3 as trigger1, a.col4 as trigger2
  ,a.col15 as contract_number, a.col6 as description
from (
select length(t.col2),(row_number() over (order by id)) as ord,t.*
from app_account.params p
inner join app_account.import_temp t on p.guid=t.reference
order by t.id
) a
left join antifraud et
on a.contract_number=et.contract_number
and a.trigger1=et.trigger1
and a.trigger2=et.trigger2
and a.monitored_date=et.monitored_date
where a.ord>3
and et.contract_number is null;

ERROR:

SQL Error: ORA-00904: "A"."MONITORED_DATE": invalid identifier
00904. 00000 -  "%s: invalid identifier"

1 个答案:

答案 0 :(得分:1)

and a.monitored_date=et.monitored_date

应该是

and a.col2=et.monitored_date