日期:2014-05-17 浏览次数:20873 次
create or replace procedure proc_alarms AS teim date; BEGIN teim := sysdate; insert into qiudf_alarms(alarm_status,alarm_datetime) values(0,teim); commit; end proc_alarms;
------解决方案--------------------
select * from v_ch;
个地方有错不是这样实现的
------解决方案--------------------
select V_CH字段 INTO 你过程中定义的变量 from v_ch;
不能直接select * from v_ch;这样字...
------解决方案--------------------
tjdate 这是日前类型吧 你定义的varchar换成date
------解决方案--------------------
返回值可能不止一行,查询语句没有分号结尾
create or replace procedure xa_clr as tjrq varchar(10); begin select tjdate into tjrq from v_ch where rownum=1; end xa_clr;
------解决方案--------------------
create or replace procedure xa_clr as tjrq varchar(10); begin select tjdate into tjrq from v_ch where rownum = 1; --commit; end xa_clr;
------解决方案--------------------
create or replace procedure xa_clr as tjrq varchar(10); begin select tjdate into tjrq from v_ch ; commit; end xa_clr;
------解决方案--------------------
你要简单的就别写查询 写增删改
create or replace procedure xa_clr(rs out sys_refcursor)
is
begin
open rs for select * from v_ch;
end xa_clr;