Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> how to: crosstable
Hi there,
I'm looking for some help with a select statement for a crosstable call. The data in my table looks like this:
id datetime value flag
1 1997-11-28 01:00 7.51 X 1 1997-11-28 02:00 7.55 X 1 1997-11-28 03:00 7.59 X 1 1997-11-28 04:00 7.57 X
...
2 1997-11-28 01:00 13.31 X 2 1997-11-28 02:00 13.35 Y 2 1997-11-28 03:00 13.33 X 2 1997-11-28 04:00 13.32 Y
Is there a way to create a select statement that returns the following result set??
Result:
id day hour_1 flag_1 hour_2 flag_2 hour_3 flag_3 ...
1 1997-11-28 7.51 X 7.55 X 7.59 X ... 2 1997-11-28 13.31 X 13.35 Y 13.33 X ...
TIA for any input,
-- Dietmar Leibecke ---------------- Address is altered to discourage junk mail. Remove ".---" for the real address.Received on Fri Nov 28 1997 - 00:00:00 CST