create view c as
select decode(id_type,1,a.id,2,a.req),a.req,b.date1
from a,b
where 关联条件
select decode(id_type,1,a.id,2,a.req),a.req,b.date1
from a,b
where 关联条件
解决方案 »
- 跪求大神帮忙,解决一个难题
- oracle存储过程问题!(急)
- 优化T-Sql
- 跪求CNOUG的邀请码
- 这个oracle odbc 安装错误怎么解决?
- ODBC访问ORACLE数据库执行带输出参数的存储过程,c#端访问怎么做~~~~~~·
- 求教个sql语句问题,请各位帮忙
- ORACLE初始化文件中那些是必备参数?
- Oracle透明网关软件 for 8i 哪里去下载?
- ORA-07445: 出现异常错误: 核心转储 [psdsbaa()+1944] [SIGSEGV] [ADDR:0x14] [PC:0x10A3D25D8]
- 为什么找不到相应的记录?
- oracle8的默认用户名是??(SOS,在线等待)
select a.id,a.req,b.date1
from a,b
where b.id_type=1 and b.pid=a.id
union
select a.id,a.reg,b.date1
from a,b
where b.id_type=2 and b.req=a.id;
select a.id,a.req,b.date1
from a,b
where b.id_type=1 and a.id=b.pid(+)
union
select a.id,a.reg,b.date1
from a,b
where b.id_type=2 and a.id=b.req(+);