I run the following in sqlplus and get an error.
-------------------------------------
BEGIN
UPDATE account
SET
activity_total = nvl((SELECT 5 FROM dual),0);
END
-------------------------------------
However when I run the following in sqlplus:
-------------------------------------
UPDATE account SET activity_total = nvl((SELECT 5 FROM dual),0);
-------------------------------------
It executes.
The error from the first part:
ERROR at line 4:
ORA-06550: line 4, column 39:
PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
( - + mod not null others <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute forall time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string>
-------------------------------------
BEGIN
UPDATE account
SET
activity_total = nvl((SELECT 5 FROM dual),0);
END
-------------------------------------
However when I run the following in sqlplus:
-------------------------------------
UPDATE account SET activity_total = nvl((SELECT 5 FROM dual),0);
-------------------------------------
It executes.
The error from the first part:
ERROR at line 4:
ORA-06550: line 4, column 39:
PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
( - + mod not null others <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute forall time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string>