错误如下:
SQL> show error
PROCEDURE P_TABLE出现错误:LINE/COL ERROR
-------- -----------------------------------------------------------------
17/12 PLS-00103: Encountered the symbol "C_CONTENT" when expecting one
of the following:
:= . ( @ % ;24/33 PLS-00103: Encountered the symbol "M" when expecting one of the
following:
. ( ) , * @ % & | = - + < / > in mod not range rem => ..
an exponent (**) <> or != or ~= >= <= <> and or like between
using is null is not || is dangling
The symbol "." was substituted for "M" to continue.30/4 PLS-00103: Encountered the symbol "EXIT" when expecting one of
the following:
begin function package pragma procedure form
SQL> show error
PROCEDURE P_TABLE出现错误:LINE/COL ERROR
-------- -----------------------------------------------------------------
17/12 PLS-00103: Encountered the symbol "C_CONTENT" when expecting one
of the following:
:= . ( @ % ;24/33 PLS-00103: Encountered the symbol "M" when expecting one of the
following:
. ( ) , * @ % & | = - + < / > in mod not range rem => ..
an exponent (**) <> or != or ~= >= <= <> and or like between
using is null is not || is dangling
The symbol "." was substituted for "M" to continue.30/4 PLS-00103: Encountered the symbol "EXIT" when expecting one of
the following:
begin function package pragma procedure form
解决方案 »
- 语法检查!
- Your username and/or password are invalid.
- Oracle的job是同步的吗
- oracle维护分哪几种维护级别?报价标准是什么?
- 请问可以用exp将dmp文件导入指定的表空间中吗?
- oracle 多个表的查询问题
- 如何把表中content字段中的'abc' 替换为‘xyz'?
- xp下装oracle出问题,让我在这儿发表一下对windows xp的不满
- ???????????????????????????????????
- 关于oracle 的表名问题。
- Oracle中能否用语句返回2个结果集回来。
- 9ids新手上路,请哪位好心的人给个例子或下载地址
as
v_xlmc VARCHAR2(12);
v_XLDM VARCHAR2(5);
begin
v_g3e_table g3e_component.g3e_table%type;
cursor c_table IS
select g3e_table from g3e_component where g3e_cno=(select g3e_primaryattributecno
from g3e_features_optable where g3e_fno=10118);
begin
open c_table;
loop
fetch c_table into v_g3e_table;
dbms_output.put_line(v_g3e_table);
dbms_output.put_line('select * from '||v_g3e_table);
cursor c_content IS
select xlmc,xldm from v_g3e_table;
begin
open c_content;
loop
fetch c_content into v_xlmc,v_xldm;
dbms_output.put_line(v_xlmc);
dbms_output.put_line(v_xldm);
exit when c_content%notfound;
end loop;
close c_content;
commit;
end;
exit when c_table%notfound;
end loop;
close c_table;
commit;
end;
end p_table;
/
LINE/COL ERROR
-------- -----------------------------------------------------------------
6/14 PLS-00103: Encountered the symbol "G3E_COMPONENT" when expecting
one of the following:
:= . ( @ % ;
The symbol ":=" was substituted for "G3E_COMPONENT" to continue.7/11 PLS-00103: Encountered the symbol "C_TABLE" when expecting one
of the following:
:= . ( @ % ;16/12 PLS-00103: Encountered the symbol "C_CONTENT" when expecting one
of the following:
:= . ( @ % ;29/4 PLS-00103: Encountered the symbol "EXIT" when expecting one of
the following:
begin function package pragma procedure form
as
v_xlmc VARCHAR2(12);
v_XLDM VARCHAR2(5);
cursor c_table IS
select g3e_table from g3e_component where g3e_cno=(select g3e_primaryattributecno
from g3e_features_optable where g3e_fno=10118);
type t_sor is ref cursor;
v_sor t_sor;
str varchar2(50);
begin
for v_table in c_table loop
str:='select xlmc,xldm from '||v_table.g3e_table;
open v_sor for str;
loop
fetch v_sor into v_xlmc,v_xldm;
exit when v_sor%notfound;
dbms_output.put_line(v_xlmc||' '||v_xldm);
end loop;
close v_sor;
end loop;
end p_table;
/
create or replace procedure p_table
(
p_id number,
p_g3e_fno g3e_features_optable.g3e_fno%type,
P_G3E_CNO VARCHAR2(20)
)
as
v_xlmc VARCHAR2(12);
v_XLDM VARCHAR2(5);
v_misfield varchar2(10);
cursor c_table IS
select g3e_table from g3e_component where g3e_cno=(select g3e_primaryattributecno
from g3e_features_optable where g3e_fno=p_g3e_fno);
cursor c_field IS
SELECT MIS_FIELD,DATATYPE,FILEFIELDTYPE FROM FYSJ_GIS_FIELDCONFIG where mis_table_id=p_id and ISkeyfield=1;
type t_sor is ref cursor;
v_sor t_sor;
v_sor1 t_sor;
str varchar2(50);
str1 varchar2(50);
begin
for v_table in c_table loop
str:='select xlmc,xldm from '||v_table.g3e_table;
dbms_output.put_line(v_table.g3e_table);
open v_sor for str;
loop
fetch v_sor into v_xlmc,v_xldm;
dbms_output.put_line('hello g3e_table');
dbms_output.put_line(v_xlmc||' '||v_xldm);
exit when v_sor%notfound;
for v_field in c_field loop
str1:='SELECT '||v_field.MIS_FIELD' FROM sjglzxt.ST_XL_XLGK where xlmc='||v_xlmc' and xldm='||v_xldm;
open v_sor1 for str1;
loop
fetch v_sor1 into v_misfield;
dbms_output.put_line(v_misfield);
exit when v_sor1%notfound;
end loop;
close v_sor1;
end loop;
close v_sor;
end loop;
end p_table;
/
还不行呀,帮忙看看
29/21 PLS-00364: 循环索引变量 'V_FIELD' 的使用无效
是不是少了一个end loop,可是加上以后还是不行呀