1

I am trying to run the following code within SQLPlus:

exec lbacsys.sa_sysdba.create_policy(policy_name => 'ACCESS_LOCATIONS',
                                      column_name => 'OLS_COLUMN',
                                      default_options => 'READ_CONTROL,INSERT_CONTROL,UPDATE_CONTROL,DELETE_CONTROL,LABEL_DEFAULT,LABEL_UPDATE,CHECK_CONTROL,');

However, I'm getting the following error:

BEGIN lbacsys.sa_sysdba.create_policy(policy_name => 'ACCESS_LOCATIONS',; END;

                                                                        *
ERROR at line 1:
ORA-06550: line 1, column 78:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
( - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
continue avg count current exists max min prior sql stddev
sum variance execute forall merge time timestamp interval
date <a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<an alternatively-quoted string literal with character set specification>
<an alternatively

It seems to me to be something I'm doing wrong with the syntax. I'm just not sure what it is. Any help would be appreciated. Thanks :)

1 Answer 1

4

The EXEC statement takes a line of code and wraps it in a BEGIN/END block. In this case you want to split your call over several lines of code, so you'll probably find it easier to add the BEGIN/END yourself:

BEGIN
  lbacsys.sa_sysdba.create_policy(policy_name => 'ACCESS_LOCATIONS',
                                  column_name => 'OLS_COLUMN',
                                  default_options =>
       'READ_CONTROL,INSERT_CONTROL,'
    || 'UPDATE_CONTROL,DELETE_CONTROL,'
    || 'LABEL_DEFAULT,LABEL_UPDATE,CHECK_CONTROL,');
END;
/
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.