yingyang
yingyang

Reputation: 47

Invalid identifier in sql oracle

I'm beginner in oracle sql. And I having an error in my script. I don't know what's wrong. I check everything possible that will cause an error. Please help me..

Here's the script:

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"

Upvotes: 0

Views: 780

Answers (1)

Jeffrey Kemp
Jeffrey Kemp

Reputation: 60312

and a.monitored_date=et.monitored_date

should be

and a.col2=et.monitored_date

Upvotes: 1

Related Questions