![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
oracle
orvill
这个作者很懒,什么都没留下…
展开
-
eas bos hr 如何通过SQL查看所有用户被禁用的权限?
select us.fnumber usernumber,pm.falias_l2 name from t_pm_userorgperm uop join t_pm_permitem pm on uop.fpermitemid=pm.fid join t_pm_user us on uop.fowner=us.fid where uop.fpermtype=20 union selec原创 2014-04-18 17:18:16 · 583 阅读 · 0 评论 -
游标例子2
/* 用PL/SQL语言编写一程序,实现按部门分段(6000以上、(6000,3000)、3000元以下)统计各工资段的职工人数、 以及各部门的工资总额(工资总额中不包括奖金) 先写出可能用到的查询语句 a = select distinct deptno from dept; select sal from emp where deptno= a中的某个值; 关于结果的输出: 1.原创 2014-04-21 14:49:06 · 460 阅读 · 0 评论 -
oracle 之 pl/sql
pl/sql :是oracle 对sql语言的过程化扩展原创 2014-04-19 17:21:24 · 398 阅读 · 0 评论 -
游标例子
/* 为员工长工资。从最低工资调起每人长10%,但工资总额不能超过50万元, 请计算长工资的人数和长工资后的工资总额,并输出输出长工资人数及工资总额。 先写出可能用到的sql语句 select empno,sal from emp order by sal; select sum(sal) from emp; */ set serveroutput on --使用set ser转载 2014-04-21 14:39:02 · 366 阅读 · 0 评论 -
sql 中穿件GUID
select *, NewID() as random from sm_menus order by random原创 2014-05-06 15:26:34 · 436 阅读 · 0 评论 -
eas-bos hr 查人员
select * from t_hr_leavebill where fnumber in('QJ-20110325-0000002967','QJ-20100723-034') select * from t_org_admin where fid='O9P5KwEPEADgAAhswKgCZ8znrtQ=' select * from t_org_hro where fid='00000原创 2014-04-18 17:13:11 · 612 阅读 · 0 评论 -
ORACLE的JOB怎么用
在oracle中想设定一个job 每天早上8点开始执行,每小时执行一次,晚上10点结束?原创 2014-04-19 14:37:16 · 545 阅读 · 0 评论 -
oracle 常用用法
create view v$_dept t1 select deptno,... rownum ora独有的伪字段 每个结果集都有这个字段 select ename,sal from (select ename,sal,rownum r from (select ename,sal from emp order by sal desc)) where r>=6 and r conn sy原创 2014-04-19 07:53:36 · 420 阅读 · 0 评论 -
eas 常用 SQL
update T_PM_USer set fdeforgunitid='O9P5KwEPEADgAAdDwKgCZ8znrtQ=' where fdeforgunitid='00000000-0000-0000-0000-000000000000CCE7AED4'原创 2014-04-18 17:23:29 · 510 阅读 · 0 评论 -
oracle 除去重复的行
DISTINCT 关键字可从 SELECT 语句的结果中除去重复的行。如果没有指定 DISTINCT,那么将返回所有行,包括重复的行。 select count(distinct t.destaddr) from nbyd_send t where t.input_time > to_date('2007-2-1','yyyy-mm-dd') and t.input_time转载 2014-04-18 17:11:42 · 566 阅读 · 0 评论 -
eas用户实名丢失如何解决?
户实名显示为空是因用户导入数据导致,执行以下脚本即可解决此问题。 select * from t_bd_person where fid in (select fpersonid from t_pm_user where fnumber='用户编码') update t_pm_user set fpersonid=(select fid from t_bd_person where fname原创 2014-04-18 17:19:47 · 500 阅读 · 0 评论 -
oracle利用游标 往表中批量插入数据
declare cursor c1 is select fid from T_DEV_Informationtable; fid T_DEV_Informationtable.fid%Type; begin open c1; loop fetch c1 into fid ; exit when c1%notfound; insert into T_DEV_Maintenan原创 2014-04-24 16:31:47 · 7281 阅读 · 0 评论