29. Oktober 200223 j Hi, ich hab grad ein paar probs mit meinem oracle sql statement ... eventuell kann mir ja wer helfen ... select to_char(begin,'HH24') "H", count(callcount) "WV" from akstat where trunc(begin) = to_date('19.10.02','dd.mm.yy') and result like 'WV' group by to_char(begin,'HH24'); select to_char(begin,'HH24') "H", count(callcount) "WV" from akstat where trunc(begin) = to_date('19.10.02','dd.mm.yy') and result [b]not[/b] like 'WV' group by to_char(begin,'HH24'); diese 2 statements sollen nun zu einem zusammengefasst werden, sodass ich in der ersten spalte den uhrzeit wert habe, in der 2ten den callcount mit dem result 'WV' und in der dritten die callcount mit den uebrigen werten, ohne 'WV' ... also im prinzip ein non-equi-inner-join ... oder mit subselects ... aber ich bekomm das irgendwie net hin.
29. Oktober 200223 j problem geloest. select ak1.h, ak1.wv, ak2.h, ak2.nonwv from ( select to_char(begin,'HH24') h, count(callcount) wv from akstat where trunc(begin) = to_date('19.10.02','dd.mm.yy') and result like 'WV' group by to_char(begin,'HH24') ) ak1, ( select to_char(begin,'HH24') h, count(callcount) nonwv from akstat where trunc(begin) = to_date('19.10.02','dd.mm.yy') and result not like 'WV' group by to_char(begin,'HH24') ) ak2 where ak1.h = ak2.h order by 1
Archiv
Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.