17,140
社区成员




select t.rating_wid,t.created_on_dt,t.feedback,t.replyer,t.reason,t.responsible,t.solution from
(
select
nf.rating_wid, --每个客户评价都会对应一个rating_wid,但有可能评价多次就可能出现多条记录,每条记录的rating_wid相同
nf.feedback_dt, -- 反馈时间
nf.feedback, --客户的反馈详细描述
nf.replyer, --跟进人
nf.reason, --差评原因
nf.responsible, --责任归属
nf.solution from Nx_Order_Rating_Feedback_f nf --责任归属
group by nf.rating_wid,nf.created_on_dt,nf.feedback,nf.replyer,nf.reason,nf.responsible,nf.solution
order by nf.created_on_dt desc)t
CREATE OR REPLACE PROCEDURE 存储过程名字
IS
BEGIN
select t.rating_wid,t.created_on_dt,t.feedback,t.replyer,t.reason,t.responsible,t.solution from
(
select nf.rating_wid,nf.created_on_dt,nf.feedback,nf.replyer,nf.reason,nf.responsible,nf.solution,
ROW_NUMBER() OVER(PARTITION BY nf.rating_wid ORDER BYnf.created_on_dt desc) AS code_id
from Nx_Order_Rating_Feedback_f nf)t
where t.code_id=1
EXCEPTION
--异常处理语句段
WHEN NO_DATA_FOUND THEN dbms_output.put_line('NO_DATA_FOUND');
END 存储过程名字
--电脑没有oracle开发环境,楼主帮 我看看能调试下没有语法错误不,拜谢