PL/SQL (MOSC)

MOSC Banner

Plsql error

edited Jan 19, 2017 4:00AM in PL/SQL (MOSC) 5 commentsAnswered

Hi,

Is this syntax wrong?

SQL> BEGIN

  2    FOR Rec IN (SELECT object_name, object_type FROM DBA_objects WHERE owner='SYSFS' AND object_type IN ('TABLE','VIEW')) LOOP

    IF Rec.object_type IN ('TABLE','VIEW') THEN

  3    4        EXECUTE IMMEDIATE 'GRANT SELECT, UPDATE, INSERT, DELETE ON SOURCEUSER.'||Rec.object_name||' TO 834147';

  5        END IF;

  6    END LOOP;

  7  END;

  8  /

BEGIN

*

ERROR at line 1:

ORA-00942: table or view does not exist

ORA-06512: at line 4

Regards,

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