- 浏览: 114489 次
- 性别:
- 来自: 重庆
文章分类
最新评论
create or replace function getSignUsers(strExamID varchar2,strUserCode varchar2,strSignCount varchar2) return varchar2 is
Result varchar2(1000);
i integer :=0;
cursor c1 is
select cname from exam_apply_current_user a , empymt@pqpms b
where exam_id = strExamID
and a.user_code = strUserCode
and a.sign_count = strSignCount
and a.sign_user_code = b.empyno
order by cname;
begin
Result := '';
for r1 in c1 loop
if c1%notfound then
exit;
end if;
if i = 0 then
Result := r1.cname;
else
Result := result||','||r1.cname;
end if;
i := i +1;
end loop;
return(Result);
end getSignUsers;
create or replace function getWeekly(var_date in date)
return varchar2
is
tmp_weekly varchar2(10) := null;
begin
--var_date + 1, for Sunday is first day of a week
select case when to_char(var_date+1 , 'iw') = '01' and to_char(var_date , 'iw') = '01' and to_char(var_date , 'mmdd') > '0201'
then to_char(var_date , 'yyyy')||'-'||to_char(to_number(to_char(var_date - 6 , 'iw')) + 1)
else case when to_char(var_date+1 , 'iw') = '01' and to_char(var_date , 'iw') <> '01' and to_char(var_date , 'mmdd') > '0201'
then to_char(var_date , 'yyyy')||'-'||to_char(to_number(to_char(var_date , 'iw')) + 1)
else to_char(var_date+1 , 'yyyy-iw') end end into tmp_weekly from dual ;
return tmp_weekly ;
end getWeekly;
Result varchar2(1000);
i integer :=0;
cursor c1 is
select cname from exam_apply_current_user a , empymt@pqpms b
where exam_id = strExamID
and a.user_code = strUserCode
and a.sign_count = strSignCount
and a.sign_user_code = b.empyno
order by cname;
begin
Result := '';
for r1 in c1 loop
if c1%notfound then
exit;
end if;
if i = 0 then
Result := r1.cname;
else
Result := result||','||r1.cname;
end if;
i := i +1;
end loop;
return(Result);
end getSignUsers;
create or replace function getWeekly(var_date in date)
return varchar2
is
tmp_weekly varchar2(10) := null;
begin
--var_date + 1, for Sunday is first day of a week
select case when to_char(var_date+1 , 'iw') = '01' and to_char(var_date , 'iw') = '01' and to_char(var_date , 'mmdd') > '0201'
then to_char(var_date , 'yyyy')||'-'||to_char(to_number(to_char(var_date - 6 , 'iw')) + 1)
else case when to_char(var_date+1 , 'iw') = '01' and to_char(var_date , 'iw') <> '01' and to_char(var_date , 'mmdd') > '0201'
then to_char(var_date , 'yyyy')||'-'||to_char(to_number(to_char(var_date , 'iw')) + 1)
else to_char(var_date+1 , 'yyyy-iw') end end into tmp_weekly from dual ;
return tmp_weekly ;
end getWeekly;
发表评论
-
Oracle Delete误删除数据恢复
2019-02-19 11:11 416获得chamber_move给定时间点时数据内容 select ... -
ORA-02391问题的解决方法
2016-07-27 10:28 3166ORA问题的分析和解决其实是一个很好的学习思路,抓住一个每一个 ... -
Oracle 操作
2016-07-19 09:25 482删除表空间及对应磁盘文件; drop tablespace R ... -
oracle recyclebin
2016-07-13 14:06 0oracle 回收站recyclebin是10g才有的新特性, ... -
Oracle数据库远程导入(EXP)、导出(IMP)
2016-04-25 16:20 2062用exp/imp远程(本地)操作 ... -
EXP-00091错误的说明和解决方法
2016-04-25 15:33 1009对于一个经常用oracle的 ... -
查看表空间使用情况
2016-03-10 11:46 631查看表空间使用情况 方法一: SELECT a.tablesp ... -
oracle 在删除表,表空间,用户时 如何释放磁盘空间
2016-03-10 11:30 1121一、drop表 执行drop table xx 语句 dr ... -
oracle 查看用户表数目,表大小,视图数目等
2016-03-10 11:01 1622oracle 查看用户表数目,表大小,视图数目等 查看当前用 ... -
小数处理函数(trun(),round(),ceil()和floor())
2015-07-28 16:49 1281trun()round()函数 trunc截取 ... -
关于Oracle取整的函数
2015-07-06 15:09 873关于Oracle取整的函数分别有以下几种: 1.取整( ... -
权限分配
2015-06-18 17:01 631view 权限分配 grant select on vw_mf ... -
Oracle回闪空间不足引起的ORA-03113问题排解
2015-04-03 13:44 4412Oracle回闪空间不足引起的ORA-03113问题排解 现 ... -
oracle中替换字符串中回车换行符
2014-04-29 18:24 1983select trim(replace(a.ctimer_pi ... -
Oracle字符串处理函数
2014-01-08 17:09 701项目中有涉及存储过程对字符串的处理,所以就将在网上查找到的资料 ... -
oracle translate() 详解+实例
2014-01-08 17:05 714oracle translate() 详解+实 ... -
ITPUB网址
2013-12-24 09:34 849ITPUB网址: http://blog.itpub.net/ ... -
oracle常用系统表
2013-09-10 13:26 640dba_开头..... dba_users 数据库用户信息 ... -
分布式 ORA-02049 错误的解决[转]
2013-09-04 13:59 2261一.系统环境: ORACLE:9IR2 OS:WINDOWS ... -
ORACLE 异常错误处理
2013-07-26 09:44 667ORACLE 异常错误处理 本篇主要内容如下: 5.1 异常 ...
相关推荐
打开控制台发现报错:object is not a function。 感觉很奇怪,这块的功能最新没动过怎么会突然出问题了呢?上线时主流浏览器都测试过了呀。 虽然奇怪,但是还的解决问题。看着代码发现一个radio对象的name属性和一...
function RadioCheck() { var Radio=document .getElementsByName ("rdoSelect"); for (var j=0;j;j++) { if (Radio[j].checked) { document .getElementById ("USRNUM").value=Radio [j].value; } } }...
主要介绍了Sqlserver 自定义函数 Function使用介绍,在sqlserver2008中有3中自定义函数:标量函数/内联表值函数/多语句表值函数,需要的朋友可以参考下
S-Function 可以使用MATLAB®,C,C ,Ada,或Fortran 语言来编写。使用MEX 实用工具,将C,C ,Ada,和Fortran 语言的S-Function 编译成MEX-文件,在需要的时候,它们可与其它的MEX-文件一起动态地连接到MATLAB 中...
ASP研发中有用的函数(function)集合(1) ’************************************* ’防止外部提交 ’************************************* function ChkPost() dim server_v1,server_v2 chkpost=false ...
The Function Point Counting Practices Manual is the definitive description of the Function Pointing Counting Standard. Several versions of the manual are available, each describing the standard or ...
S-Function可以使用MATLAB®,C,C++,Ada,或 Fortran语言来编写。使用 MEX实用工具, 将 C,C++,Ada,和 Fortran 语言的 S-Function 编译成 MEX-文件,在需要的时候,它们可与其它的 MEX-文件一起动态地连接到...
This brief monograph on the gamma function was designed by the author to fill what he perceived as a gap in the literature of mathematics, which often treated the gamma function in a manner he ...
编写的蹦极系统的S-function案例详解,可以参考博客:https://blog.csdn.net/didi_ya/article/details/118190541
s-function函数,s-function函数定义放置错误,matlab源码
使用MATLAB中的s-function builder集成外部代码,定义s-function参数
(* General Purpose Hash Function Algorithms Library *) (* *) (* Author: Arash Partow - 2002 *) (* URL: http://www.partow.net *) (* URL: ...
繁體Delphi Function 繁體Delphi Function 繁體Delphi Function 繁體Delphi Function
增加VC6.0的__FUNCTION__宏,并有测试工程
文档描述了在Simulink中用C语言实现S-Function进行仿真的原理及三种方法。这可以带来很多方便,比如已经有C语言实现的算法,可以直接引入进行仿真。
matlab子函数function用法示例
使用S-Function函数实现离散PID控制器,并建立simulink仿真模型。 使用S-Function函数实现离散PID控制器,并建立simulink仿真模型。
oracle_function用法
Function Point Counting Practices Manual (功能点计算实践手册)4.3版