Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> oracle sql query - output one line?

oracle sql query - output one line?

From: <captain_2010_at_yahoo.com>
Date: 8 Mar 2005 03:21:09 -0800
Message-ID: <1110280869.675466.161050@o13g2000cwo.googlegroups.com>


hi,

Below is the output required, how ?

Total 1980 1981 1982 1983
20 1 3 5 2

SQL written below gives output as

    TOTAL TO_C
--------- ----

        1 1980
       10 1981
        1 1982
        1 1987

SQL:
select count(*) as Total,to_char(hiredate,'yyyy') from emp group by to_char(hiredate,'yyyy');

How to get output as given above i.e. in one line.

Captain Received on Tue Mar 08 2005 - 05:21:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US