PL/SQL (MOSC)

MOSC Banner

ORA-00905 missing keyword on JOIN

edited Feb 20, 2013 8:45PM in PL/SQL (MOSC) 5 commentsAnswered
hii'm getting a ORA-00905 on the AS keyword in the SQL below. I've tried removing the AS but that didn't help. Any suggestions?

select tv.monitorname as "Monitor Name", count(tv.typeofvisit) as "# of Visits", count(to_date(l.submitdate, 'mm/dd/yyyy')- (l.visitend+16)) as "# Late", count(to_date(ot.submitdate, 'mm/dd/yyyy') - (ot.visitend+16)) as "# On Time"
FROM Form_CTOMonitor tv
left outer JOIN (select l.monitorname FROM Form_CTOMonitor where ((to_date(l.submitdate, 'mm/dd/yyyy') >(l.visitend+16)))) AS l ON (l.monitorname = tv.monitorname)
LEFT outer JOIN (select ot.monitorname FROM Form_CTOMonitor where ((to_date(ot.submitdate, 'mm/dd/yyyy') <= (ot.visitend+16)))) as ot ON (l.monitorname = ot.monitorname)

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center