Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> update with subselect

update with subselect

From: Tom <tomsonn_at_gmx.net>
Date: 24 Sep 2001 00:27:04 -0700
Message-ID: <e6ec512f.0109232327.7b70d756@posting.google.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US