orcal 根据打分时间计算打分情况

匿名 (未验证) 提交于 2019-12-03 00:38:01

create or replace function F_GET_TEST(in_ny in date,in_project_id in number
)
return number is
sReturn number(17,2);

/*
功能:测算“项目质量分数”,
入参:in_ny 月份 SCM_MDM_WBS_MONTH对应月份 与项目
in_project_id:项目id


返回:返回测算的值

*/


begin

--直接用项目报工总天数除以绩效团队报工天数
select 100+ nvl(sum(nvl(t.source,0)),0) into sReturn from SCM_MDM_QUALITY_SCORE t where t.project_id=in_project_id and to_char(t.create_date,‘YYYYMMDD‘)<= to_char(in_ny,‘YYYYMMDD‘)and t.use_flag=‘Y‘ ;
return sReturn;

end;

原文:https://www.cnblogs.com/zhangzhiqin/p/9240103.html

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!