Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> update with subselect
Hi everybody,
I've an update-stmt that works fine in sql-plus, but if i try to compile it inside an procedure it fails with the following 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>
update-stmt:
update
rep_account rep_account1
set
rep_account1.percentage =
rep_account1.debit / ( select distinct rep_account2.debit from rep_account rep_account2 where rep_account2.rcv_internalid = rep_account1.rcv_internalid and rep_account2.pos_id = pkg_gloconst.pos_accountbalance ) * 100 where rep_account1.rcv_internalid = ext_rcv_row.internalid and rep_account1.pos_id in ( pkg_gloconst.pos_ccy_balance,
pkg_gloconst.pos_accountbalance_all )
;
any ideas? thnx in advance
Tom
Received on Mon Sep 24 2001 - 02:27:04 CDT
![]() |
![]() |