OPID ALATEXT
time 2006 09 07 15 43 51
comp NI E LP 2 E1 23
Type E coations
severity E mi
probable E deSignal想转换成
time comp Type severity probable
2006 09 07 15 43 51 NI E LP 2 E1 23 E coations E mi E deSignal请问该怎么办?
time 2006 09 07 15 43 51
comp NI E LP 2 E1 23
Type E coations
severity E mi
probable E deSignal想转换成
time comp Type severity probable
2006 09 07 15 43 51 NI E LP 2 E1 23 E coations E mi E deSignal请问该怎么办?
解决方案 »
- 表列数值update问题
- 字符集
- SQL where语句求解
- ORACLE在WINDOWS2000 SERVER 中的服务启动了,但数据库不能也自动启动。
- 去掉某字段重复值的语句,在SQL Server中可以执行,在Oracle中怎么改?
- 触发器的使用,请大家帮忙啊~~~~~~~~~~~~~~~~~~~~~~~~谢谢你们了!!!!!!!!!!!!!!!!
- Oracle怎么书写sql server中top 3之类的sql(就是成绩前三名的学生之类需求)
- imp导入成功,但数据库中找不到导入的数据表及视图
- sql中使用的datediff函数,在oracle中又对等函数表示吗?
- 关于Oracle11g design center打不开的问题
- oracle自增序列问题
- 程序包或函数处于无效状态
from
(select decode(OPID,'time',ALATEXT) as time,
...,
decode(probable,'time',ALATEXT) as probable
from tab)
group by time,...,probable之后再嵌掏一层,把count(*)去掉!
decode(OPID,'comp', ALATEXT,null) comp
decode(OPID,'type', ALATEXT,null) type
decode(OPID,'severity', ALATEXT,null) severity
decode(OPID,'probable', ALATEXT,null) probable
from table
group by OPID
select decode(OPID, 'time', select time from table, null) time,
decode(OPID, 'comp', select comp from table, null) comp
decode(OPID, 'type', select type from table, null) type
decode(OPID, 'severity', select severity from table, null) severity
decode(OPID, 'probable', select probable from table, null) probable
from table
group by OPID
select time,...,probable,count(*)
from
(select decode(OPID,'time',ALATEXT) as time,
...,
decode(OPID,'probable',ALATEXT) as probable
from tab)
group by time,...,probable
select decode(OPID,'time',ALATEXT) as time,
...,
decode(OPID,'probable',ALATEXT) as probable
from tab
time comp Type severity probable
2006 09 07 15 43 51
NI E LP 2 E1 23
E coations
E mi
E deSignaltime 2006 09 07 15 43 51
comp NI E LP 2 E1 23
Type E coations
severity E mi
probable E deSignal
我的表里数据是这样的:
OPID ALATEXT
time 2006 09 07 15 43 51
comp NI E LP 2 E1 23
Type E coations
severity E mi
probable E deSignal
time 2006 09 08 10 40 50
comp NI E LP 2 E1 23
Type E coationsss
severity E mirrr
probable E deSignalwww想转换成
time comp Type severity probable
2006 09 07 15 43 51 NI E LP 2 E1 23 E coations E mi E deSignal
decode(OPID, 'comp', select ALATEXT from table where OPID = 'comp', null) comp
decode(OPID, 'type', select ALATEXT from table where OPID = 'type', null) type
decode(OPID, 'severity', select ALATEXT from table where OPID = 'severity', null) severity
decode(OPID, 'probable', select ALATEXT from table where OPID = 'probable', null) probable
from table
group by OPID