Q

Invalid identifier error

Can anybody help me with this?: ERROR at line 5: ORA-00904: "MAXAWARDS"."ROLE": invalid identifier

Can anybody help me with this?
SQL> select f.role from filmography
  2  ,
  3  (select max(awards) as maxiawards,username from filmography
  4  group by username)maxawards
  5  where f.role=maxawards.role
  6  and filmography.awards=maxawards.maxiawards;
where f.role=maxawards.role
             *
ERROR at line 5:
ORA-00904: "MAXAWARDS"."ROLE": invalid identifier
In your query, you are using an "inline view" to pull data and the results of this inline view are known as the table MAXAWARDS. Here is the part of your query that denotes the inline view:
(select max(awards) as maxiawards,username from filmography 
group by username)maxawardsc
Your MAXAWARDSC view only contains the MAXIAWARDS and USERNAME columns. Yet in line 5, you are looking for the ROLE column of this view. Since this column does not exist, you get the error. You'll have to include the ROLE column in the inline view.
This was first published in May 2006
This Content Component encountered an error

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close