在一条select语句中,可不可以实现条件可变的?如果field1='1' 那么field2>100
如果field1='2' 那么field2<=100
如果field1='2' 那么field2<=100
解决方案 »
- 请教一个 存储过程的游标使用方法。。。。。。
- ORACLE 10g 透明网关下载
- 由于字符集不同。我定义了一个乱字符列表。在进行转化时,将正确也替换。
- 数据导入时数据量异常增大,可能是什么原因?
- ORA-01861给高分,急求解决方案
- 关于从一表中选择数据插入另一表中,在线等。QQ:4739739
- 这100分是给ern(毕业生)的,其它人不要抢 。谢谢他回答我的问题 。
- 这个过程应该怎么写?
- 求一sql语句(急,在线等)
- 请问SQL,PL/SQL,SQL*Plus,PL/SQL Developer之间的关系是什么?
- 求一aix下oracle 10g的自动备份脚本
- oracle 10 g 出现table or view does not exist
(
select field1,
case when field1='1' then
case when field2>100 then field2 end
when field1='2' then
case when field2<=100 then field2 end
end field2
from t4
) t
(
select field1,
case when field1='1' then
case when field2>100 then field2 end
when field1='2' then
case when field2<=100 then field2 end
end field2
from t4
) t
where t.field2 is not null
where (t.field=1 and field2>100) or (t.filed=2 and field2<=100)
不知道這樣行不行,沒試過