看看存储过程建立有错
SQL> ed
Wrote file afiedt.buf
1 insert into yk_against_promise_stat (register_no,the_days)
2 select register_no,
3 (select count(*) from dual)
4 from
5 yk_job_info
6* where 1 = 2
SQL> /
0 rows created.
SQL> ed
Wrote file afiedt.buf
1 create or replace function f_test(p_char char)
2 return number
3 is
4 begin
5 insert into yk_against_promise_stat (register_no,the_days)
6 select register_no,
7 (select count(*) from dual)
8 from
9 yk_job_info
10 where 1 = 2
11 ;
12 return 1;
13* end;
SQL> /
Warning: Function created with compilation errors.
SQL> show err
Errors for FUNCTION F_TEST:
LINE/COL ERROR
-------- -----------------------------------------------------------------
7/7 PLS-00103: Encountered the symbol "SELECT" when expecting one of
the following:
( - + mod not null others <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute cast trim forall
<a string literal with character set specification>
<a number> <a single-quoted SQL string>
8/3 PLS-00103: Encountered the symbol "FROM" when expecting one of
the following:
<an identifier> <a double-quoted delimited-identifier> set
12/1 PLS-00103: Encountered the symbol "RETURN"