第一次写csdn博客,不知道写点什么好,翻下自己总结的文档,发现这个oracle调用函数是几年前记录的,就以它为开篇吧
ELECT *
FROM (select ROWNUM AS rowno,wt.id,wt.task_name,wt.khfz_name,wt.khfa_id,to_char(wt.start_date,'yyyy-MM-dd hh24:mi:ss') as start_time,to_char(wt.end_date,'yyyy-MM-dd hh24:mi:ss') as end_time,wt.status,wt.frontid,
tps.planres lastres,
to_char(tps.plantime,'yyyy-MM-dd hh24:mi:ss') plantime,get_plan_res(wt.id) taskres
from WORK_TASK wt,
(select tp.khfa_id as taskid,
tp.zt_pjsql planres,
max(tp.yj_ksrq) plantime
from T_MONITOR_PLAN tp
where tp.zt_pjsql != '0'
group by tp.khfa_id, tp.zt_pjsql) tps
where wt.id = tps.taskid
and ROWNUM <= 10) table_alias
WHERE table_alias.rowno >= 0