SQL Language (MOSC)

MOSC Banner

Insert using CTE (WITH instruction in select) raises ORA-00942

in SQL Language (MOSC) 5 commentsAnswered

LS,

Oracle DB versie 19.3 on Linux platforms

I'm trying to run a simple INSERT statement based on a CTE (WITH instruction in select); a CTE is used to 'compute' rows to be inserted in a TABLE. That TABLE is actually a public synonym pointing to a view pointing to the actual table the rows will need to be added to.

When I run the insert connected as the table/view schema 'owner', everything works fine.

When I grant access/insert privs to/on the view to a third user, and then execute the insert as thta third user, I always get ORA-00942; whatever happens. Access/inserts are possible without any problem if not using CTE (WITH instruction), using PLSQL, ...

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