select decode((select * from
(select 5 as a from dual) where a not between 1 and 6),null,0,decode((select * from
(select 5 as a from dual) where a not between 1 and 7),null,0,decode((select * from
(select 5 as a from dual) where a not between 1 and 8),null,0,decode((select * from
(select 5 as a from dual) where a not between 1 and 9),null,0,1))))
from dual
(select 5 as a from dual) where a not between 1 and 6),null,0,decode((select * from
(select 5 as a from dual) where a not between 1 and 7),null,0,decode((select * from
(select 5 as a from dual) where a not between 1 and 8),null,0,decode((select * from
(select 5 as a from dual) where a not between 1 and 9),null,0,1))))
from dual
解决方案 »
- 触发器 性能问题
- vfoxpro的dbf表导入oracle的问题?急急急!
- 请问国内比较好的Oracle论坛有那些?
- 一个序列号的值能否同时录到两个表中?(很急)
- 请求指教,关于索引
- VARCHAR 和VARCHAR2有什么区别
- 请教一个SQL语句
- 我的一台装有oracle的笔记本带动了100台客户端,高兴散分
- ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
- 为什么在8i能执行的,将数据库移植到9i后存储过程不能执行。
- Oracle用户密码更改求助
- 在MS SQL中能实现,不知道在Oracle中怎么实现.注意:只能是一句话实现
case
when count(b.XSID)<=25 then 'DOWN25'
when count(b.XSID) >25 count(b.XSID) <= 35 then '26-35'
...
else 'UP66'
end
(select department_id as a from tz_department) where a not between 1 and 25),null,'DOWN25',decode((select * from
(select department_id as a from tz_department) where a not between 26 and 36),null,'DOWN26',decode((select * from
(select department_id as a from tz_department) where a not between 55 and 77),null,'DOWN27',decode((select * from
(select department_id as a from tz_departmentb) where a not between 188 and 99),null,'DOWN28','aaaa'))))
from tz_department
select a.XBM,b.NJID,AgeRange=
case
when year(getdate())-cast(substring(a.CSRQ,1,4) as int)<= 10 then 'Down10'
when year(getdate())-cast(substring(a.CSRQ,1,4) as int)= 11 then '11'
when year(getdate())-cast(substring(a.CSRQ,1,4) as int)= 12 then '12'
when year(getdate())-cast(substring(a.CSRQ,1,4) as int)= 13 then '13'
when year(getdate())-cast(substring(a.CSRQ,1,4) as int)= 14 then '14'
when year(getdate())-cast(substring(a.CSRQ,1,4) as int)= 15 then '15'
when year(getdate())-cast(substring(a.CSRQ,1,4) as int)= 16 then '16'
when year(getdate())-cast(substring(a.CSRQ,1,4) as int)= 17 then '17'
else 'Up18'
end
from EBD_STUDENT_JBXX a,EBD_SCHOOL_BJXX b
where a.BJBH=b.BJBH and a.XXDM=b.XXDM and a.XXDM=@XXDM
and a.DQZTM ='0'
and a.CSRQ is not null
and b.NJID in ('21','22','23','24')