Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error Code: 904, SQL State: 42000] ORA-00904: "G"."NAME": invalid

654905Feb 24 2011 — edited Feb 24 2011
When I run the SQL below, I receive the following:

08:00:08 [SELECT - 0 row(s), 0.000 secs] [Error Code: 904, SQL State: 42000] ORA-00904: "G"."NAME": invalid identifier

When I comment out the BOLD lines, it runs okay. I've tried fully qualifying the column with no success. I'm sure it's a formatting issue.

************************************************

Select
sr.schoolid,
sr.studentid, sr.coursenumber,
sr.REGISTREQ_ID,
(select
min(rr.ID||'-'||rr.COURSEGROUP)
from
REGISTREQ rr
where
rr.grade_level = (select s.sched_nextyeargrade from students s where sr.studentid = s.id)
and rr.yearid = 2100
and rr.id not in (6426,6415)
and rr.COURSEGROUP in
(select
g.name
from
gen g
where
g.CAT = 'coursegroups'
and instr(g.valuet, sr.coursenumber) > 0
and g.schoolid = sr.schoolid)
and ((g.name like '%ALT%' and sr.GLOBALALTERNATECOURSE=1)
or (g.name not like '%ALT%' and sr.GLOBALALTERNATECOURSE=0))
) as New_RegID
from
SCHEDULEREQUESTS sr
where
sr.schoolid = 703
and sr.yearid = 2100
This post has been answered by BluShadow on Feb 24 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 24 2011
Added on Feb 24 2011
5 comments
23,398 views