error in where clause [message #331360] |
Thu, 03 July 2008 02:17 |
jyothsna1612
Messages: 68 Registered: June 2008
|
Member |
|
|
Hi,
create table emp1(nm varchar2(12), salary number)
declare
bon number;
ename varchar2(12);
begin
select salary*0.1 into bon
from emp1
where nm=&ename;
dbms_output.put_line(bon);
end;
It's giving error in TOAD
Though it's simple i'm unable to find why the error
|
|
|
|
|
|
|
|
|
Re: error in where clause [message #332193 is a reply to message #331360] |
Mon, 07 July 2008 16:18 |
mad_bu
Messages: 8 Registered: August 2006
|
Junior Member |
|
|
Hi jyothsna1612
you can try this in Toad.
EXAMPLE :
create table autoqa.emp1(nm varchar2(12), salary number);
Table Created.
insert into autoqa.emp1 values('TEST',100);
1 row Created.
declare
bon number;
ename varchar2(12);
begin
select salary*0.1 into bon
from emp1
where nm=&ename;
dbms_output.put_line(bon);
end;
/
Enter value for ename: 'TEST'
old 7: where nm=&ename;
new 7: where nm='TEST';
10
PL/SQL procedure successfully completed.
-mad_bu.
[Updated on: Mon, 07 July 2008 16:58] Report message to a moderator
|
|
|