Home » SQL & PL/SQL » SQL & PL/SQL » simple PL/SQL question 2
simple PL/SQL question 2 [message #38008] Wed, 13 March 2002 10:23 Go to next message
Rania
Messages: 2
Registered: March 2002
Junior Member
I put the dual table but still gets a mistake

1 declare g_msg varchar2(20) := 'RANIA';
2 begin
3 select *
4 into g_msg
5 from dual
6* end;
end;
*
ERROR at line 6:
ORA-06550: line 6, column 1:
PLS-00103: Encountered the symbol "END" when expecting one of the following:
. , @ ; for <an identifier>
<a double-quoted delimited-identifier> group having intersect
minus order partition start subpartition union where connect
SAMPLE_
The symbol ";" was substituted for "END" to continue.

ALSO,there is another simple ex where it should be working but is not. I dont understand what I do wrong.
1 declare
2 idno empp%rowtype;
3 begin
4 select *
5 into idno
6 from empp
7 where idno = 7839
8* end
end
*
ERROR at line 8:
ORA-06550: line 8, column 1:
PLS-00103: Encountered the symbol "END" when expecting one of the following:
* & - + ; / at for mod rem <an exponent (**)> and or group
having intersect minus order start union where connect ||
Re: simple PL/SQL question 2 [message #38011 is a reply to message #38008] Wed, 13 March 2002 10:42 Go to previous message
Rajarshi
Messages: 11
Registered: November 2001
Junior Member
PL/SQL 1
********
declare
g_msg varchar2(20) := 'RANIA';
begin
select *
into g_msg
from dual;
end;

PL/SQL 2
********
declare
idno empp%rowtype;
begin
select *
into idno
from empp
where idno = 7839;
end;

In both the cases I put a semi-colon after the SELECT.... statemet !!
Previous Topic: Error 00900 in stored procedure
Next Topic: Replacing values in CLOB column
Goto Forum:
  


Current Time: Thu Mar 28 07:31:56 CDT 2024