SELECT ID,
MAX (DECODE (costtype, '001', costtype)),
MAX (DECODE (costtype, '001', COST)),
MAX (DECODE (costtype, '002', costtype)),
MAX (DECODE (costtype, '002', COST)),
MAX (DECODE (costtype, '003', costtype)),
MAX (DECODE (costtype, '003', COST))
FROM tablea
GROUP BY ID
MAX (DECODE (costtype, '001', costtype)),
MAX (DECODE (costtype, '001', COST)),
MAX (DECODE (costtype, '002', costtype)),
MAX (DECODE (costtype, '002', COST)),
MAX (DECODE (costtype, '003', costtype)),
MAX (DECODE (costtype, '003', COST))
FROM tablea
GROUP BY ID
解决方案 »
- Windows 2003与AIX下的Oracle的区别
- SQL语句问题
- v$loghist 日志历史信息
- vc+ado 连接 oracle 数据库,连接串中 DataSource = 任何东西 都行?
- 我最近在面试,请教各位大神说一些数据库的知识。谢谢了
- 新手请教各位,我如何知道服务器端Oracle数据库使用了什么字符集来保存数据?(没有看到V$NLS_PARAMETERS系统表)
- 请问用一条SQL语句怎样实现?????
- ROWID
- 在win2000 专业版下能安装oracle9i吗?
- ORACLE是如何来登陆到服务器的!
- 100分求ORACLE9i的帮助文档
- oracle的过程为什么老需要编译??
有类似的帖子的.搜一下.