Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> SQL Crosstab
Given a table:
a char(2) b char(2)
a takes the values AA, BB, CC, DD, EE
b takes the values 01, 02, 03, 04, 05
how easy is it (or even possible to produce a cross tab of a by b)
01 02 03 04 05
AA 357 23 5 67 14
BB 34 135 77 267 17
CC 111 346 13 43 346
DD 3 7 23 198 11
EE 17 4 13 12 4
with and without the use of DECODE. Does anyone have a solution for 2 variables when the range of values that the variables can take is unknown (say char(20)).
-- Greg Hayes greg_at_hayford.demon.co.ukReceived on Tue May 13 1997 - 00:00:00 CDT
![]() |
![]() |