Home » SQL & PL/SQL » SQL & PL/SQL » ORA-00904: "ROWID" invalid identifier
ORA-00904: "ROWID" invalid identifier [message #218015] Tue, 06 February 2007 06:56 Go to next message
a_developer
Messages: 194
Registered: January 2006
Senior Member
drop materialized view log on salgrade;
drop materialized view log on emp;

CREATE MATERIALIZED VIEW LOG ON emp WITH SEQUENCE, ROWID INCLUDING NEW VALUES;
CREATE MATERIALIZED VIEW LOG ON salgrade WITH SEQUENCE, ROWID INCLUDING NEW VALUES;

create materialized view Mv_emp_sal 
refresh fast on commit 
as
select e.empno, e.ename, e.sal, s.grade, e.rowid, s.rowid
from emp e, salgrade s
where e.sal between s.losal and s.hisal;


I get this on e.rowid:
ORA-00904: "ROWID" invalid identifier

What's wrong?? How do I correct this? Thanks..
Re: ORA-00904: "ROWID" invalid identifier [message #218019 is a reply to message #218015] Tue, 06 February 2007 07:44 Go to previous messageGo to next message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

Try alias ?

create materialized view Mv_emp_sal 
refresh fast on commit 
as
select e.empno, e.ename, e.sal, s.grade, e.rowid as rowidE, s.rowid as rowidS
from emp e, salgrade s
where e.sal between s.losal and s.hisal;

[Updated on: Tue, 06 February 2007 07:45]

Report message to a moderator

Re: ORA-00904: "ROWID" invalid identifier [message #218022 is a reply to message #218019] Tue, 06 February 2007 07:54 Go to previous messageGo to next message
a_developer
Messages: 194
Registered: January 2006
Senior Member
Thanks!! I got it -- it would produce 2 columns of the same name! Am I dumb!!.. Embarassed
Re: ORA-00904: "ROWID" invalid identifier [message #218049 is a reply to message #218022] Tue, 06 February 2007 10:12 Go to previous message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

No problem

It happens to all of us Wink
Glad it worked out Smile
Previous Topic: Checking for null in Nested table column
Next Topic: Can someone pls help me with this one... (merged)
Goto Forum:
  


Current Time: Fri Dec 09 13:51:34 CST 2016

Total time taken to generate the page: 0.13513 seconds