首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

PLS-00103: 出现符号

2014-01-28 
在过程里调用输入参数时,应该怎么用,如果参数是字符串类型的,像如下我写的过程,会报下面的错误,应该怎么改

在过程里调用输入参数时,应该怎么用,如果参数是字符串类型的,像如下我写的过程,会报下面的错误,应该怎么改呢?


CREATE OR REPLACE Procedure update_product_price1 (
v_NAME In Varchar2(20),
p_factor In Number
) As

v_product_count Integer;
Begin
Select Count(1) Into v_product_count From products Where Name = v_NAME;
If v_product_count > 0 Then
Update products
Set price = price * p_factor
Where Name = v_NAME;
Commit;
End If;
Exception
When Others Then
dbms_output.put_line( '没有这个产品! ');


End update_product_price1;
/

--报的错:
LINE/COL ERROR
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2/20 PLS-00103: 出现符号 "( "在需要下列之一时: := . ) , @ % default character 符号 ":= " 被替换为 "( " 后继续。
7/65 PLS-00103: 出现符号 "= "在需要下列之一时: . ( * @ % & = - + ; < / > at for in is mod not rem <an exponent (**)> <> or != or ~= > = <= <> and or like between group having intersect minus order start union where connect || 符号 ".在 "= " 继续之前已插入。


------解决方法--------------------------------------------------------
把声明中“CREATE OR REPLACE Procedure update_product_price1 (
v_NAME In Varchar2(20),
p_factor In Number         

热点排行