求助大神,oracle存储过程表达式类型错误:pls 00382
在PL/SQL中执行后,提示这一行错误,openresultforycdata;说表达式类型错误,但是我就是想让返回一个浮点型的值呀定义包如下:createorrepla...
在PL/SQL中执行后,提示这一行错误,open result for ycdata;说表达式类型错误,但是我就是想让返回一个浮点型的值呀
定义包如下:
create or replace package pkg_test
as
type type_cursor is ref cursor;
procedure read_rows (result out type_cursor);
end pkg_test;
包实现:
create or replace package body pkg_test
as
procedure read_rows (result out type_cursor)
is
ycdata float;
begin
ycdata := 'select h0 into ycdata from ycdata201308 where bujianleixingid = 19 and bujianid = 172024 and bujiancanshuid = 4';
open result for ycdata;
end read_rows;
end pkg_test; 展开
定义包如下:
create or replace package pkg_test
as
type type_cursor is ref cursor;
procedure read_rows (result out type_cursor);
end pkg_test;
包实现:
create or replace package body pkg_test
as
procedure read_rows (result out type_cursor)
is
ycdata float;
begin
ycdata := 'select h0 into ycdata from ycdata201308 where bujianleixingid = 19 and bujianid = 172024 and bujiancanshuid = 4';
open result for ycdata;
end read_rows;
end pkg_test; 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询