oracle中这样创建存储过程对不,为什么执行时老是提示错误,说存储过程无效
createorreplaceprocedurecar_run(in_carincar_behavior.car%type)asout_startTimedate;out...
create or replace procedure car_run
(in_car in car_behavior.car%type
)
as
out_startTime date;
out_endTime date;
begin
select dateutil.int2date(start_time),dateutil.int2date(end_time)
into out_startTime, out_endTime
from car_behavior
where car=in_car and btype='I';
dbms_output.put_line('startTime:'||out_startTime);
dbms_output.put_line('endTime:'||out_endTime);
end car_run;
begin
car_run(3602);
end; 展开
(in_car in car_behavior.car%type
)
as
out_startTime date;
out_endTime date;
begin
select dateutil.int2date(start_time),dateutil.int2date(end_time)
into out_startTime, out_endTime
from car_behavior
where car=in_car and btype='I';
dbms_output.put_line('startTime:'||out_startTime);
dbms_output.put_line('endTime:'||out_endTime);
end car_run;
begin
car_run(3602);
end; 展开
1个回答
展开全部
select dateutil.int2date(start_time),dateutil.int2date(end_time)
into out_startTime, out_endTime
from car_behavior
where car=in_car and btype='I';
这里有问题 你试试
execute immediate 'select dateutil.int2date(start_time),dateutil.int2date(end_time)
into out_startTime, out_endTime
from car_behavior
where car='||in_car||' and btype=''I'' ';
into out_startTime, out_endTime
from car_behavior
where car=in_car and btype='I';
这里有问题 你试试
execute immediate 'select dateutil.int2date(start_time),dateutil.int2date(end_time)
into out_startTime, out_endTime
from car_behavior
where car='||in_car||' and btype=''I'' ';
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询