Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help: SELECT STATEMENT
Hi JM, I think that you can write a SQL Statement
that can be like the above.
Greetings
In article <P7hz4.31817$t7.1892238_at_news1.rdc2.tx.home.com>, "JM" <riper_at_yahoo.com> wrote:
> I have following table: > > Switch-column position-column Time > switchA On 1:00 > switchA Off 2:00 > switchD On 1:00 > switchB Off 1:00 > switchD Off 2:00 > switchC Off 1:00 > switchC Off 2:00 > ============================= > I need following output: > > Switch On-Total Off-Total > switchA 1 1 > SwitchB 0 1 > SwitchC 0 2 > SwitchD 1 1 > ============================== > As above the output is grouped by Switch column. I can't figure outhow to
> split > position-column into "on-total' and "off-total" columns using SELECT > statement. > > Thanks in advance! > Manny > >
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Mar 14 2000 - 14:28:03 CST