日期:2014-05-17  浏览次数:20997 次

下面的過程語句有什麼問題嗎?編繹通不過
(
  RQ1 IN VARCHAR2,
  RQ2 IN VARCHAR2
 )
is
begin
  insert into YSD(RCRQ,JYDH,ZHDH,SSSL,YSSL,PLBH)
 select PLJY_CDRQ,PLJY_JYDH,PLJY_ZHBZDH,PLJY_SL,PLJY_YSSL, substr(PLJYMX_PLBH,1,12)||substr(PLJYMX_PLBH,14,5)as aa
From PLJY,PLJYMX
where PLJY_JYDH=PLJYMX_JYDH
And PLJY_CDRQ BETWEEN to_date(RQ1,'yyyy/mm/dd') and to_date(RQ2,'yyyy/mm/dd')
end;
報錯如下:
Line # = 7 Column # = 3 Error Text = PL/SQL: SQL Statement ignored
Line # = 10 Column # = 29 Error Text = PL/SQL: ORA-00933: SQL 命令的結束有問題
Line # = 11 Column # = 4 Error Text = PLS-00103: 發現了符號 "end-of-file" 當您等待下列事項之一發生時: begin case declare end exception exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge <a single-quoted SQL string> pipe 


------解决方案--------------------
在 to_date(RQ2,'yyyy/mm/dd') 的后面少了个分号(;)。
------解决方案--------------------
每条语句后面要有个;