PLS-00103: Encountered the symbol "VARCHAR2" when expecting one of the

feifeiyaqi3 2008-01-31 02:02:01
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> Declare
2 Type ename_table_Type Is Varchar2(100) of emp.ename %Type;
3 ename_table ename_table_Type:=ename_table_type('&name1','&name2','&name3');
4 sql_stat varchar2(100):='update emp Set sal=sal*1.1'
5 ||'where Lower(ename)=Lower(:1)';
6 Begin
7 ForAll i In .. ename_table.Count
8 Execute Immediate sql_stat Using ename_table (i);
9 End;
10 /
Enter value for name1: yaq
Enter value for name2: yaq
Enter value for name3: yaq
old 3: ename_table ename_table_Type:=ename_table_type('&name1','&name2','&name3');
new 3: ename_table ename_table_Type:=ename_table_type('yaq','yaq','yaq');
Type ename_table_Type Is Varchar2(100) of emp.ename %Type;
*
ERROR at line 2:
ORA-06550: line 2, column 26:
PLS-00103: Encountered the symbol "VARCHAR2" when expecting one of the
following:
( array limited new private range record VARRAY_ char_base
number_base decimal date_base clob_base blob_base bfile_base
table ref object fixed varying opaque sparse
The symbol "range" was substituted for "VARCHAR2" to continue.
ORA-06550: line 2, column 40:
PLS-00103: Encountered the symbol "OF" when expecting one of the following:
. ( * % & - + ; / at mod remainder rem .. <an exponent (**)>
|| multiset
ORA-06550: line 7, column 13:
PLS-00103: Encountered the symbol "." when expecting one of the following:
( - + case mod new null <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current max min prior sql stddev sum values va


SQL>请问上面的问题怎么解决呀??谢




2.
SQL> insert into emp(empno,ename,hiredate) values(9005,'Ppss','2008-5-28');
insert into emp(empno,ename,hiredate) values(9005,'Ppss','2008-5-28')
*
ERROR at line 1:
ORA-01438: value larger than specified precision allows for this column
Hiredate --------- date
这种情况下是用转换函数还是重新再用个时间类型呀?谢
...全文
2271 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
fxianxian 2008-02-01
  • 打赏
  • 举报
回复
Type ename_table_Type Is Varchar2(100) of emp.ename %Type
把Varchar2(100)改为RECORD
'2008-5-28'改为TO_DATE('2008-5-28','YYYY-MM-DD')
feifeiyaqi3 2008-02-01
  • 打赏
  • 举报
回复
mark
feifeiyaqi3 2008-01-31
  • 打赏
  • 举报
回复
我是在WINDOWS操作系统上用的ORACLE
10G的

17,086

社区成员

发帖
与我相关
我的任务
社区描述
Oracle开发相关技术讨论
社区管理员
  • 开发
  • Lucifer三思而后行
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧