Thursday 2 December 2010

ORA-01762: vopdrv: view query block not in FROM

ORA-01762: vopdrv: view query block not in FROM

01762. 00000 - "vopdrv: view query block not in FROM"

*Cause:

*Action:

Error at Line: 29 Column: 18


 

Answer:: Relace join with simple muti-join table query , see below e.g.


 

WITH

NewsT AS ( SELECT P.related_id ID

FROM Profiling P
JOIN Account A

ON A.ID = P.account_id

WHERE P.profiling_type = 1

AND P.related_type = 3

AND A.ID = 6 )

 Select * FROM NewsT;

Replace Join:

WITH

NewsT AS ( SELECT P.related_id ID

FROM Profiling P , Account A

Where A.ID = P.account_id

AND P.profiling_type = 1

AND P.related_type = 3

AND A.ID = 6 )

 Select * FROM NewsT;

Great, it works !

3 comments:

Dan Eisinger said...

I ran into this error when using the WITH clause for a complex SELECT query. It turns out it was because I wasn't utilizing one of my earlier defined subqueries in the final main query... makes sense now I guess, but Oracle's description of the error certainly wasn't helpful.

Arbab said...

I faced the same issue. The comment was really helpfulin resolving my problem.

Unknown said...

Hi - I have been facing this frustating problem - cant make it work as per suggutions. Still breaking my head to resolve this problem.

Oracle errors are really not user friendly.