create or replace procedure proTmpso_new(sYear in varchar2,sMonth in Varchar2,SESID VARCHAR2,sCCN varchar2) As
vdata varchar2(10);
vDate varchar2(20);
vDate := sYear||'/'||sMonth||'/1';
Cursor Tmpso_Cur IS
SELECT CCN,MAS_LOC,ITEM,REVISION,to_Char(FORECAST_DATE,'YYYY/MM') f_date,Nvl(sum(QTY),0) qty
FROM forecast
where
CCN=sCCN AND FORECAST_DATE Between to_date(vDate,'YYYY/MM/DD')
AND add_months(to_date(vDate,'YYYY/MM/DD'),9)
Group by CCN,MAS_LOC,ITEM,REVISION,to_Char(FORECAST_DATE,'YYYY/MM');
begin
...
end proTmpso_new;其中 vDate := sYear||'/'||sMonth||'/1'; 发生错误不知为什么吗?错误信息如下:Error: PLS-00103: Encountered the symbol "=" when expecting one of the following:
constant exception <an identifier>
<a double-quoted delimited-identifier> table LONG_ double ref
char binary national character nchar
The symbol "<an identifier>" was substituted for "=" to continue
vdata varchar2(10);
vDate varchar2(20);
vDate := sYear||'/'||sMonth||'/1';
Cursor Tmpso_Cur IS
SELECT CCN,MAS_LOC,ITEM,REVISION,to_Char(FORECAST_DATE,'YYYY/MM') f_date,Nvl(sum(QTY),0) qty
FROM forecast
where
CCN=sCCN AND FORECAST_DATE Between to_date(vDate,'YYYY/MM/DD')
AND add_months(to_date(vDate,'YYYY/MM/DD'),9)
Group by CCN,MAS_LOC,ITEM,REVISION,to_Char(FORECAST_DATE,'YYYY/MM');
begin
...
end proTmpso_new;其中 vDate := sYear||'/'||sMonth||'/1'; 发生错误不知为什么吗?错误信息如下:Error: PLS-00103: Encountered the symbol "=" when expecting one of the following:
constant exception <an identifier>
<a double-quoted delimited-identifier> table LONG_ double ref
char binary national character nchar
The symbol "<an identifier>" was substituted for "=" to continue
解决方案 »
- 错误ORA-12545: Connect failed because target host or object does not exist
- 配置oracle Net Configuration Assistant时报以下错误 请问怎么修改啊
- 在PB中对Oracle的备份问题!我的代码哪里错了?
- 请教高手:象oracle这样的软件是用什么语言写成的?
- oracle中有导出数据的脚本吗?可以写在存储过程里的。
- create user的语句还是不会,帮帮我
- 数据库查询问题??在线等待回答!!
- OAS应用问题?
- 数据库如何把0点作为24点
- oracle触发器,表多行转置插入一行多列,急!!!
- [在线等候]使用 vc++6.0 的CRecordset 类访问 oracle 数据库时,m_strfilter 中不能包含子查询的问题
- 全文检索的问题,急!!!!!
vDate := sYear||'/'||sMonth||'/1'; 改成:vDate varchar2(20) := sYear||'/'||sMonth||'/1';