try to use the function decode
解决方案 »
- oracle audit,如何审计ORACLE日志
- 关于oracle 9i连sql server2000的问题
- ORACLE的TIMESTAMP类型设置问题!!
- 怎样把查询出来的记录放入局部临时表中
- 疑难:oracle的clob中大文本插入问题
- 怎么将ORACLE数据库对象导入到DB2中去
- 请问oracle中raise是什么意思?为什么不用rollback?
- 急于寻求帮助!为何我在Proc中的SQl语句不返回执行结果?
- 急!!!求ORACLE 时间比较问题??----------在线等
- 如何在WINDOWS ME中安装ORACLE8I?
- 同样的程序在不同的操作系统下连接oracle速度的不同反应!
- 大哥们,我快郁闷死了,关于数据库资源占用问题!!救我!!!!!!!!!!!!!!!!!!!
type1和type2原来的数值并不是2、4、0,只不过select时用decode转的
from table2 a,
table3 b
where a.id =(*) b.id
不过没完全写出来...
from table2 a,
table3 b
where a.id =(+) b.id
(
select id,decode(typm,'G',2,4) type1 from tb1
) a,
(
select id,decode(tb2.add,'China',2,4)*decode(tb3.id,null,0,1) type2 from tb2,tb3
where tb2.id=tb3.id(+)
) b
where a.id=b.id and a.type1<>b.type2
(
select id,decode(typm,'G',2,4) type1 from tb1
) a,
(
select tb2.id,decode(tb2.add,'China',2,4)*decode(tb3.id,null,0,1) type2 from tb2,tb3
where tb2.id=tb3.id(+)
) b
where a.id=b.id and a.type1<>b.type2