Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> update with subselect
Hi everybody,
I've got the following update-stmt:
update
rep_account
set
rep_account.percentage =
rep_account.debit / ( select rep_cover.total_balance_all from rep_cover where rep_cover.internalid = rep_account.rcv_internalid ) * 100 where rep_account.rcv_internalid = ext_rcv_row.internalid and rep_account.pos_id in ( pkg_gloconst.pos_ccy_balance,
pkg_gloconst.pos_accountbalance_all )
;
It works fine if I run it in SQL-Plus, but if I try to compile it into a procedure I alway get the error:
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>
PLS-00103: Encountered the symbol "*" when expecting one of the following:
ERROR
thanx in advance
Tom
Received on Fri Sep 21 2001 - 11:23:44 CDT