Re: how to use select clause in assignment

From: mcstock <mcstockspamplug_at_spamdamenquery.com>
Date: Sat, 22 Nov 2003 07:01:26 -0500
Message-ID: <9bGdnYXBANW3zSKiRVn-jg_at_comcast.com>


look in the first chapter of the PL/SQL Users Guide under 'Assigning Values to Variables''

you need to user the SELECT INTO syntax

  • mcs

"joy" <joyfoely_at_yahoo.com> wrote in message news:357eb048.0311211928.6d86416e_at_posting.google.com...
| I am writting a procedure, i am using a table:
| part(empno,...,partid,..). I already know the partid, and I need to
| know empno so I can use it to invoke another procedure--like
| empb(myid). part of the code like:
| myid =
| (select empno
| from part
| where partid = part_id;);
| and I started the procedure, it gave me:
| 15/16 PLS-00103: Encountered the symbol "SELECT" when expecting one
| of
| the following:
| ( - + case mod new 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 merge time timestamp interval date
| <a string literal with character set specification>
| <a number> <a single-quoted SQL string> pipe

|

| 17/39 PLS-00103: Encountered the symbol ")"
| what should I do? Thanks for help!
Received on Sat Nov 22 2003 - 13:01:26 CET

Original text of this message