create or replace package types as
type my_cursor is ref cursor;
end;
create or replace procedure proc_get_MLTInputData(startdate in date,enddate in date,
tempCursor out types.my_cursor)
as
begin
if startdate is not null and enddate is not null
then
open tempCursor for select UNITSINFONAME as company,productsname as product,
createdate,nvl(CheckValues,READVALES) as value from RawMeteringChamber where
createdate>=startdate and createdate<=enddate;
end if;
end;这个存储过程哪儿错了啊 怎么执行的啊 编译都通过了 Test 也没报错 执行就是报错 存储sql
解决方案 »
- 新手问一个SB问题。ORACLE的内核用C写的么?
- oracle 查询 急急急急!!
- 如何在过程中调用过程,被调用的过程名作为参数传入?
- 求组一条SQL语句写法!!!急,在线等!!!
- ora-01092错误怎么解决?
- oracle:数据冷备份恢复后出现问题,UnknownHostException
- Oracle里没有top的?那么能什么来代替?
- 在PRO*C中定义存储过程是不是和ORACLE中定义的存储过程效率一样低,定义光标是不是也和在ORACLE的存储过程中使用的光标一样的慢?
- 求救!
- 请教如何将Oracle存储函数转为java方法?
- 同一张表,根据查询条件的不同,对结果集合并,并标记状态
- 求一个oracle能用的存储过程,给你一个月份求出包含该月的所有天数的记录!例如给你2012-12那你就返回1号到31号的查询记录!
select func_name(date1,date2) from dual;
create or replace function func_get_MLTInputData(startdate in date,enddate in date
) RETURN SYS_REFCURSOR AUTHID CURRENT_USER
as
CUR SYS_REFCURSOR;
begin
if startdate is not null and enddate is not null
then
open CUR for select UNITSINFONAME as company,productsname as product,
createdate,nvl(CheckValues,READVALES) as value from RawMeteringChamber where
createdate>=startdate and createdate<=enddate;
end if;
return CUR
end;--调用函数,返回结果
select func_get_MLTInputData(to_date('20121212','yyyymmdd'),to_date('20121212','yyyymmdd')) from dual;