PLS-00103: Encountered the symbol "VARCHAR2" when expecting one of the
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
这种情况下是用转换函数还是重新再用个时间类型呀?谢