satishpc
08-13-2001, 11:49 AM
hi,
assuming i have 2 tables temp1 and temp2 both having fields
t1 & t2
if i write a query at the sql prompt
update temp1 a set t2 = t1*( select t2 from temp2 b where b.t1 = a.t1);
it works properly but when i put it in a procedure
create or replace procedure test as
begin
update temp1 a set t2 = t1*( select t2 from temp2 b where b.t1 = a.t1);
end;
it gives the foll error.
LINE/COL ERROR
-------- -----------------------------------------------------------------
3/30 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>
can anyone please suggest a solution
satish
assuming i have 2 tables temp1 and temp2 both having fields
t1 & t2
if i write a query at the sql prompt
update temp1 a set t2 = t1*( select t2 from temp2 b where b.t1 = a.t1);
it works properly but when i put it in a procedure
create or replace procedure test as
begin
update temp1 a set t2 = t1*( select t2 from temp2 b where b.t1 = a.t1);
end;
it gives the foll error.
LINE/COL ERROR
-------- -----------------------------------------------------------------
3/30 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>
can anyone please suggest a solution
satish