Oracle 9i Vs 10g Express Edition PL SQL syntax problem?
895800Dec 4 2011 — edited Dec 4 2011The following code works perfectly on Oracle 9i , but fails in 10g Express Edition. Please help me figure out what the problem is
product_master table exists and there is nothing wrong in there.The problem is a syntical one. Is there some 9i compatible mode? I'm using oracle express edition of 10 g. Login using the webbrowser. That itself is annoying.Why isnt there an SQL+ ide unlike 9i?
Code :
declare
pd_no varchar2(6);
cst number(8,2);
begin
pd_no:=&pd_no;
SELECT cost_price INTO cst
from product_master
where product_no=pd_no;
cst:=cst-200;
IF cst >= 3000 THEN
UPDATE product_master SET cost_price=cost_price-200
WHERE product_no=pd_no;
END IF;
END;
The error I get is
ORA-06550: line 5, column 14:
PLS-00103: Encountered the symbol "&" when expecting one of the following:
( - + case mod new not null
avg
count current exists max min prior sql stddev sum variance
execute forall merge time timestamp interval date
pipe
3. cst number(8,2);
4. begin
5. pd_no:=&pd_no;
6. SELECT cost_price INTO cst
7. from product_master
I changed & to : .The it asked for input but the following error came up
ORA-06550: line 16, column 2:
PLS-00103: Encountered the symbol ";"
1. declare
2. pd_no varchar2(6);
3. cst number(8,2);