我的存储过程中有这样一段:
v_query := 'select * from currhours where EPCB_CHR_SUMTIME>to_date('2005-07-01','YYYY-MM-DD') and CHR_SUMTIME<to_date('2005-07-03','YYYY-MM-DD') '
open Cables_Return for lv_query;编译存储过程报错:Compilation errors for PACKAGE BODY YH_SCJK.PG_TRSCABLEError: PLS-00103: Encountered the symbol "2005" when expecting one of the following:
. ( * @ % & = - + ; < / > at in is mod not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like
between ||
The symbol "(" was substituted for "2005" to continue.
Line: 11
我知道可能是to_date函数里的单引号有问题,可是该怎么改呢?请各位指点!
v_query := 'select * from currhours where EPCB_CHR_SUMTIME>to_date('2005-07-01','YYYY-MM-DD') and CHR_SUMTIME<to_date('2005-07-03','YYYY-MM-DD') '
open Cables_Return for lv_query;编译存储过程报错:Compilation errors for PACKAGE BODY YH_SCJK.PG_TRSCABLEError: PLS-00103: Encountered the symbol "2005" when expecting one of the following:
. ( * @ % & = - + ; < / > at in is mod not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like
between ||
The symbol "(" was substituted for "2005" to continue.
Line: 11
我知道可能是to_date函数里的单引号有问题,可是该怎么改呢?请各位指点!
解决方案 »
- 有一种数据库连接关系,我想知道它的术语叫什么?中文和英文的名称。。谢谢
- Oracle数据库查询的问题
- 冷备份恢复到异机,安装位置不同.
- 两个问题
- 求救!! 一条SQL语句!!
- pl/sql登陆提示用户锁定
- 删除表的外键与主键的顺序
- 使用database configuration assistant删除数据库后,managerment server无法刷新
- 如何看数据库死锁数?
- 这样的sql语句怎么处理比较好呢??
- 请教:这个Access Sql转换成Oracle Sql 怎么写?
- 用编译器只做预处理时发生错误 linker input file unused because linking not done
照你的改了,还是报错啊!!Compilation errors for PACKAGE BODY YH_SCJK.PG_TRSCABLE
Error: PLS-00103: Encountered the symbol "OPEN" when expecting one of the following:
. ( * @ % & = - + ; < / > at in is mod not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like
between ||
Line: 14
Text: open Cables_Return for lv_query;
v_query := 'select * from currhours where EPCB_CHR_SUMTIME>to_date(''2005-07-01'',''YYYY-MM-DD'') and CHR_SUMTIME<to_date(''2005-07-03'',''YYYY-MM-DD'') ';
结了!多谢 njhart2003!!